Linter
in package
Tags
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
$lintConfiguration
Class to provide css properties knowledge
protected
LintConfiguration|null
$lintConfiguration
$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
ErrorsgetLintConfiguration()
Return an instance of the "\CssLint\Properties" helper, initialize a new one if not define already
public
getLintConfiguration() : LintConfiguration
Return values
LintConfigurationlintFile()
Performs lint for a given file path
public
lintFile(string $sFilePath) : bool
Parameters
- $sFilePath : string
-
: a path of an existing and readable file
Tags
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
selfassertLintContextIsClean()
protected
assertLintContextIsClean() : bool
Return values
boolinitLint()
Initialize linter, reset all process properties
protected
initLint() : static
Return values
staticlintChar()
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
selfresetLintContext()
protected
resetLintContext() : self