void process(
File
$phpcsFile, int
$stackPtr)
Processes this sniff, when one of its tokens is encountered.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The current file being checked.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
void processMultiLineArray(
\PHP_CodeSniffer\Files\File
$phpcsFile, int
$stackPtr, int
$arrayStart, int
$arrayEnd)
Processes a multi-line array definition.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The current file being checked.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
int
$arrayStart
—
The token that starts the array definition.
int
$arrayEnd
—
The token that ends the array definition.
void processSingleLineArray(
\PHP_CodeSniffer\Files\File
$phpcsFile, int
$stackPtr, int
$arrayStart, int
$arrayEnd)
Processes a single-line array definition.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The current file being checked.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
int
$arrayStart
—
The token that starts the array definition.
int
$arrayEnd
—
The token that ends the array definition.