Documentation

PropertyTokenLinter
in package
implements TokenLinter

Table of Contents

Interfaces

TokenLinter

Constants

PROPERTY_NAME_PATTERN  = '/^[-a-zA-Z][a-zA-Z0-9_-]+$/'
VARIABLE_FORMAT  = '/^--[a-zA-Z0-9_-]+$/'
https://drafts.csswg.org/css-variables/#defining-variables

Properties

$lintConfiguration  : LintConfiguration

Methods

__construct()  : mixed
lint()  : Generator<string|int, TokenError>
Lints a token and returns a list of issues found.
supports()  : bool
Checks if the linter supports the given token.
lintPropertyName()  : Generator<string|int, TokenError>
lintPropertyValue()  : Generator<string|int, TokenError>

Constants

PROPERTY_NAME_PATTERN

private mixed PROPERTY_NAME_PATTERN = '/^[-a-zA-Z][a-zA-Z0-9_-]+$/'

VARIABLE_FORMAT

https://drafts.csswg.org/css-variables/#defining-variables

private mixed VARIABLE_FORMAT = '/^--[a-zA-Z0-9_-]+$/'

Properties

Methods

lint()

Lints a token and returns a list of issues found.

public lint(Token $token) : Generator<string|int, TokenError>
Parameters
$token : Token

The token to lint.

Return values
Generator<string|int, TokenError>

A list of issues found during linting.

supports()

Checks if the linter supports the given token.

public supports(Token $token) : bool
Parameters
$token : Token

The token to check.

Return values
bool

True if the linter supports the token, false otherwise.


        
On this page

Search results