PHP Класс CakePHP_Sniffs_NamingConventions_ValidVariableNameSniff

Наследование: extends PHP_CodeSniffer_Standards_AbstractVariableSniff
Показать файл Открыть проект

Защищенные методы

Метод Описание
_fixVar ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, string $varName ) : void
_isValidVar ( string $string, boolean $public = true ) : boolean Check that a variable is a valid shape.
processMemberVar ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes class member variables.
processVariable ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes this test, when one of its tokens is encountered.
processVariableInString ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes the variable found within a double quoted string.

Описание методов

_fixVar() защищенный Метод

protected _fixVar ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, string $varName ) : void
$phpcsFile PHP_CodeSniffer_File PHPCS file
$stackPtr integer The pointer
$varName string The variable name
Результат void

_isValidVar() защищенный Метод

Variables in CakePHP can either be $fooBar, $FooBar, $_fooBar, or $_FooBar.
protected _isValidVar ( string $string, boolean $public = true ) : boolean
$string string The variable to check.
$public boolean Whether or not the variable is public.
Результат boolean

processMemberVar() защищенный Метод

Processes class member variables.
protected processMemberVar ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
Результат void

processVariable() защищенный Метод

Processes variables, we skip processing object properties because they could come from things like PDO which doesn't follow the normal conventions and causes additional failures.
protected processVariable ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
Результат void

processVariableInString() защищенный Метод

Processes the variable found within a double quoted string.
protected processVariableInString ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the double quoted string.
Результат void