BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff Class Reference
Inheritance diagram for PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff:
Collaboration diagram for PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff:

Public Member Functions

 register ()
 
 process (File $phpcsFile, $stackPtr)
 

Public Attributes

 $supportedTokenizers = array('CSS')
 
 $error = true
 

Protected Member Functions

 addError ($phpcsFile, $stackPtr, $style, $pattern=null)
 

Protected Attributes

 $forbiddenStyles
 
 $forbiddenStyleNames = array()
 
 $patternMatch = false
 

Member Function Documentation

PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff::addError (   $phpcsFile,
  $stackPtr,
  $style,
  $pattern = null 
)
protected

Generates the error or warning for this sniff.

Parameters
\PHP_CodeSniffer\Files\File$phpcsFileThe file being scanned.
int$stackPtrThe position of the forbidden style in the token array.
string$styleThe name of the forbidden style.
string$patternThe pattern used for the match.
Returns
void
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff::process ( File  $phpcsFile,
  $stackPtr 
)

Processes this test, when one of its tokens is encountered.

Parameters
\PHP_CodeSniffer\Files\File$phpcsFileThe file being scanned.
int$stackPtrThe position of the current token in the stack passed in $tokens.
Returns
void

Implements PHP_CodeSniffer\Sniffs\Sniff.

PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff::register ( )

Returns an array of tokens this test wants to listen for.

Returns
array

Implements PHP_CodeSniffer\Sniffs\Sniff.

Member Data Documentation

PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff::$forbiddenStyles
protected
Initial value:
= 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',
)

The documentation for this class was generated from the following file: