Method | Description | |
---|---|---|
process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void | Processes this test, when one of its tokens is encountered. | |
register ( ) : array | Returns an array of tokens this test wants to listen for. |
Method | Description | |
---|---|---|
_evaluate_portion ( PHP_CodeSniffer_File $file, string $name, integer $start, integer $end ) : void | Verifies one operand of a ternary operation follows Kohana coding standards | |
_find_next ( array | integer $type, array $tokens, integer $start, integer $end, integer $parenthesis ) : integer | FALSE | Find the index of the next token of a certain type in a particular parentheses group | |
_find_next_invokation_or_access ( $current, $next, $tokens, $end, $name, PHP_CodeSniffer_File $file ) : integer | Find the next invokation or access of an object's or static class' members. | |
_find_previous ( array | integer $type, array $tokens, integer $start, integer $end, integer $parenthesis ) : integer | FALSE | Find the index of the previous token of a certain type in a particular parentheses group |
protected _evaluate_portion ( PHP_CodeSniffer_File $file, string $name, integer $start, integer $end ) : void | ||
$file | PHP_CodeSniffer_File | |
$name | string | Portion being evaluated. Used in error messages. |
$start | integer | Index of the first token in the portion |
$end | integer | Index of the last token in the portion |
return | void |
protected _find_next ( array | integer $type, array $tokens, integer $start, integer $end, integer $parenthesis ) : integer | FALSE | ||
$type | array | integer | Token type(s) to find |
$tokens | array | Tokens to search |
$start | integer | Index from which to begin |
$end | integer | Index at which to abort |
$parenthesis | integer | Index of the closing parenthesis or NULL |
return | integer | FALSE | Index of the next token or FALSE |
protected _find_next_invokation_or_access ( $current, $next, $tokens, $end, $name, PHP_CodeSniffer_File $file ) : integer | ||
$file | PHP_CodeSniffer_File | |
return | integer | The position of the last token in the call (i.e. last non-whitespace token) |
protected _find_previous ( array | integer $type, array $tokens, integer $start, integer $end, integer $parenthesis ) : integer | FALSE | ||
$type | array | integer | Token type(s) to find |
$tokens | array | Tokens to search |
$start | integer | Index from which to begin |
$end | integer | Index at which to abort |
$parenthesis | integer | Index of the opening parenthesis or NULL |
return | integer | FALSE | Index of the next token or FALSE |