AssignmentInConditionSniff
in package
implements
Sniff
Interfaces, Classes and Traits
Table of Contents
- $assignmentTokens : array<string|int, mixed>
- Assignment tokens to trigger on.
- $conditionStartTokens : array<string|int, mixed>
- The tokens that indicate the start of a condition.
- process() : void
- Processes this test, when one of its tokens is encountered.
- register() : array<string|int, int>
- Registers the tokens that this sniff wants to listen for.
Properties
$assignmentTokens
Assignment tokens to trigger on.
protected
array<string|int, mixed>
$assignmentTokens
= []
Set in the register() method.
$conditionStartTokens
The tokens that indicate the start of a condition.
protected
array<string|int, mixed>
$conditionStartTokens
= []
Methods
process()
Processes this test, when one of its tokens is encountered.
public
process(File $phpcsFile, int $stackPtr) : void
Parameters
- $phpcsFile : File
-
The file being scanned.
- $stackPtr : int
-
The position of the current token in the stack passed in $tokens.
Return values
void —register()
Registers the tokens that this sniff wants to listen for.
public
register() : array<string|int, int>