string getDeclarationNameWithNamespace(
array
$tokens, int
$stackPtr)
Returns the declaration names for classes/interfaces/functions with a namespace.
Parameters:
array
$tokens
—
Token stack for this file
int
$stackPtr
—
The position where the namespace building will start.
string getNamespaceOfScope(
File
$phpcsFile, int
$stackPtr)
Returns the namespace declaration of a file.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The file where this token was found.
int
$stackPtr
—
The position where the search for the namespace declaration will start.
void processTokenOutsideScope(
File
$phpcsFile, int
$stackPtr)
Processes a token that is found within the scope that this test is listening to.
Overrides
AbstractScopeSniff::processTokenOutsideScope() (Processes a token that is found outside the scope that this test is listening to.)
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The file where this token was found.
int
$stackPtr
—
The position in the stack where this token was found.
void processTokenWithinScope(
File
$phpcsFile, int
$stackPtr, int
$currScope)
Processes the function tokens within the class.
Overrides
AbstractScopeSniff::processTokenWithinScope() (Processes a token that is found within the scope that this test is listening to.)
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The file where this token was found.
int
$stackPtr
—
The position where the token was found.
int
$currScope
—
The current scope opener token.