void isMultiLineDeclaration(
PHP_CodeSniffer_File
$phpcsFile, int
$stackPtr, int
$openBracket, array
$tokens)
Determine if this is a multi-line function declaration.
Parameters:
PHP_CodeSniffer_File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
int
$openBracket
—
The position of the opening bracket in the stack passed in $tokens.
array
$tokens
—
The stack of tokens that make up the file.
void process(
File
$phpcsFile, int
$stackPtr)
Processes this test, when one of its tokens is encountered.
Parameters:
PHP_CodeSniffer_File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
void processMultiLineDeclaration(
PHP_CodeSniffer_File
$phpcsFile, int
$stackPtr, array
$tokens)
Processes multi-line declarations.
Parameters:
PHP_CodeSniffer_File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
array
$tokens
—
The stack of tokens that make up the file.
void processSingleLineDeclaration(
PHP_CodeSniffer_File
$phpcsFile, int
$stackPtr, array
$tokens)
Processes single-line declarations.
Just uses the Generic BSD-Allman brace sniff.
Parameters:
PHP_CodeSniffer_File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
array
$tokens
—
The stack of tokens that make up the file.