CssLint\Linter
Methods
Name | Description |
---|---|
__construct | Constructor |
getCssLintProperties | Return an instance of the “\CssLint\Properties” helper, initialize a new one if not define already |
getErrors | Return the errors occurred during the lint process |
lintFile | Performs lint for a given file path |
lintString | Performs lint on a given string |
setCssLintProperties | Set an instance of the “\CssLint\Properties” helper |
Linter::__construct
Description
public __construct (\CssLint\Properties $oProperties)
Constructor
Parameters
-
(\CssLint\Properties) $oProperties
- (optional) an instance of the “\CssLint\Properties” helper
Return Values
void
Linter::getCssLintProperties
Description
public getCssLintProperties (void)
Return an instance of the “\CssLint\Properties” helper, initialize a new one if not define already
Parameters
This function has no parameters.
Return Values
\CssLint\Properties
Linter::getErrors
Description
public getErrors (void)
Return the errors occurred during the lint process
Parameters
This function has no parameters.
Return Values
array
Linter::lintFile
Description
public lintFile (string $sFilePath)
Performs lint for a given file path
Parameters
-
(string) $sFilePath
- : a path of an existing and readable file
Return Values
bool
: true if the file is a valid css file, else false
Throws Exceptions
\InvalidArgumentException
\RuntimeException
Linter::lintString
Description
public lintString (string $sString)
Performs lint on a given string
Parameters
(string) $sString
Return Values
bool
: true if the string is a valid css string, false else
Linter::setCssLintProperties
Description
public setCssLintProperties (void)
Set an instance of the “\CssLint\Properties” helper
Parameters
This function has no parameters.
Return Values
void