PHP 클래스 CakePHP_Sniffs_NamingConventions_ValidVariableNameSniff

상속: extends PHP_CodeSniffer_Standards_AbstractVariableSniff
파일 보기 프로젝트 열기: cakephp/cakephp-codesniffer

보호된 메소드들

메소드 설명
_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