BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff Class Reference
Inheritance diagram for PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff:
Collaboration diagram for PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff:

Public Member Functions

 register ()
 
 process (File $phpcsFile, $stackPtr)
 

Protected Member Functions

 findIncrementers (array $tokens, array $token)
 

Member Function Documentation

PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff::findIncrementers ( array  $tokens,
array  $token 
)
protected

Get all used variables in the incrementer part of a for statement.

Parameters
array(integer=>array)$tokens Array with all code sniffer tokens.
array(string=>mixed)$token Current for loop token
Returns
string[] List of all found incrementer variables.
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff::process ( File  $phpcsFile,
  $stackPtr 
)

Processes this test, when one of its tokens is encountered.

Parameters
\PHP_CodeSniffer\Files\File$phpcsFileThe file being scanned.
int$stackPtrThe position of the current token in the stack passed in $tokens.
Returns
void

Implements PHP_CodeSniffer\Sniffs\Sniff.

PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff::register ( )

Registers the tokens that this sniff wants to listen for.

Returns
int[]

Implements PHP_CodeSniffer\Sniffs\Sniff.


The documentation for this class was generated from the following file: