Documentation

Linter
in package

Tags
phpstan-import-type

Errors from LintContext

Table of Contents

Properties

$charLinters  : array<string|int, CharLinter>
The list of char linters
$lintConfiguration  : LintConfiguration|null
Class to provide css properties knowledge
$lintContext  : LintContext|null
The current context of parsing

Methods

__construct()  : mixed
Constructor
getErrors()  : Errors
Return the errors occurred during the lint process
getLintConfiguration()  : LintConfiguration
Return an instance of the "\CssLint\Properties" helper, initialize a new one if not define already
lintFile()  : bool
Performs lint for a given file path
lintString()  : bool
Performs lint on a given string
setLintConfiguration()  : self
Set an instance of the "\CssLint\Properties" helper
assertLintContextIsClean()  : bool
initLint()  : static
Initialize linter, reset all process properties
lintChar()  : bool
Performs lint on a given char
resetChartLinters()  : self
resetLintContext()  : self

Properties

$charLinters

The list of char linters

protected array<string|int, CharLinter> $charLinters

$lintContext

The current context of parsing

protected LintContext|null $lintContext = null

Methods

__construct()

Constructor

public __construct([LintConfiguration $lintConfiguration = null ]) : mixed
Parameters
$lintConfiguration : LintConfiguration = null

(optional) an instance of the "\CssLint\Properties" helper

getErrors()

Return the errors occurred during the lint process

public getErrors() : Errors
Return values
Errors

getLintConfiguration()

Return an instance of the "\CssLint\Properties" helper, initialize a new one if not define already

public getLintConfiguration() : LintConfiguration
Return values
LintConfiguration

lintFile()

Performs lint for a given file path

public lintFile(string $sFilePath) : bool
Parameters
$sFilePath : string

: a path of an existing and readable file

Tags
throws
InvalidArgumentException
throws
RuntimeException
Return values
bool

: true if the file is a valid css file, else false

lintString()

Performs lint on a given string

public lintString(string $stringValue) : bool
Parameters
$stringValue : string
Return values
bool

: true if the string is a valid css string, false else

setLintConfiguration()

Set an instance of the "\CssLint\Properties" helper

public setLintConfiguration(LintConfiguration $lintConfiguration) : self
Parameters
$lintConfiguration : LintConfiguration
Return values
self

assertLintContextIsClean()

protected assertLintContextIsClean() : bool
Return values
bool

initLint()

Initialize linter, reset all process properties

protected initLint() : static
Return values
static

lintChar()

Performs lint on a given char

protected lintChar(string $charValue) : bool
Parameters
$charValue : string
Return values
bool

: true if the process should continue, else false

resetChartLinters()

protected resetChartLinters() : self
Return values
self

resetLintContext()

protected resetLintContext() : self
Return values
self

        
On this page

Search results