Source Location: /PHP_CodeSniffer-3.0.2/src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php
$error = true
[line 63]
If true, an error will be thrown; otherwise a warning.
$forbiddenStyleNames = array()
[line 49]
A cache of forbidden style names, for faster lookups.
$forbiddenStyles = array(
'-moz-border-radius' => 'border-radius',
'-webkit-border-radius' => 'border-radius',
'-moz-border-radius-topleft' => 'border-top-left-radius',
'-moz-border-radius-topright' => 'border-top-right-radius',
'-moz-border-radius-bottomright' => 'border-bottom-right-radius',
'-moz-border-radius-bottomleft' => 'border-bottom-left-radius',
'-moz-box-shadow' => 'box-shadow',
'-webkit-box-shadow' => 'box-shadow',
)
[line 33]
A list of forbidden styles with their alternatives.
The value is NULL if no alternative exists. i.e., the function should just not be used.
- Var: string|null>
- Access: protected
Type:
array
$patternMatch = false
[line 56]
If true, forbidden styles will be considered regular expressions.
$supportedTokenizers = array('CSS')
[line 23]
A list of tokenizers this sniff supports.
Method Detail
addError [line 139]
void addError(
\PHP_CodeSniffer\Files\File
$phpcsFile, int
$stackPtr, string
$style, [string
$pattern = null])
Generates the error or warning for this sniff.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the forbidden style in the token array.
string
$style
—
The name of the forbidden style.
string
$pattern
—
The pattern used for the match.
process [line 95]
void process(
File
$phpcsFile, int
$stackPtr)
Processes this test, when one of its tokens is encountered.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
register [line 71]
Returns an array of tokens this test wants to listen for.
Documentation generated on 2019年3月11日 14:04:43 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.