JumbledIncrementerSniff
in package
implements
Sniff
Interfaces, Classes and Traits
Table of Contents
- 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.
- findIncrementers() : array<string|int, string>
- Get all used variables in the incrementer part of a for statement.
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>
Return values
array<string|int, int> —findIncrementers()
Get all used variables in the incrementer part of a for statement.
protected
findIncrementers(array<string|int, mixed> $tokens, array<string|int, mixed> $token) : array<string|int, string>
Parameters
- $tokens : array<string|int, mixed>
- $token : array<string|int, mixed>
Return values
array<string|int, string> —List of all found incrementer variables.