PHP 클래스 Squiz_Sniffs_Classes_SelfMemberReferenceSniff, PHP_CodeSniffer

Verifies that :
  • self:: is used instead of Self::
  • self:: is used for local static member reference
  • self:: is used instead of self ::
저자: Greg Sherwood ([email protected])
저자: Marc McIntyre ([email protected])
상속: extends PHP_CodeSniffer_Standards_AbstractScopeSniff
파일 보기 프로젝트 열기: squizlabs/php_codesniffer

공개 메소드들

메소드 설명
__construct ( ) Constructs a Squiz_Sniffs_Classes_SelfMemberReferenceSniff.

보호된 메소드들

메소드 설명
getDeclarationNameWithNamespace ( array $tokens, integer $stackPtr ) : string Returns the declaration names for classes/interfaces/functions with a namespace.
getNamespaceOfScope ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : string Returns the namespace declaration of a file.
processTokenWithinScope ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $currScope ) : void Processes the function tokens within the class.

메소드 상세

__construct() 공개 메소드

Constructs a Squiz_Sniffs_Classes_SelfMemberReferenceSniff.
public __construct ( )

getDeclarationNameWithNamespace() 보호된 메소드

Returns the declaration names for classes/interfaces/functions with a namespace.
protected getDeclarationNameWithNamespace ( array $tokens, integer $stackPtr ) : string
$tokens array Token stack for this file
$stackPtr integer The position where the namespace building will start.
리턴 string

getNamespaceOfScope() 보호된 메소드

Returns the namespace declaration of a file.
protected getNamespaceOfScope ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : string
$phpcsFile PHP_CodeSniffer_File The file where this token was found.
$stackPtr integer The position where the search for the namespace declaration will start.
리턴 string

processTokenWithinScope() 보호된 메소드

Processes the function tokens within the class.
protected processTokenWithinScope ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $currScope ) : void
$phpcsFile PHP_CodeSniffer_File The file where this token was found.
$stackPtr integer The position where the token was found.
$currScope integer The current scope opener token.
리턴 void