NonExecutableCodeSniff
in package
implements
Sniff
Table of Contents
Interfaces
Properties
- $expressionTokens : array<string|int, mixed>
- Tokens for terminating expressions, which can be used inline.
Methods
- process() : void
- Processes this test, when one of its tokens is encountered.
- register() : array<string|int, int|string>
- Returns an array of tokens this test wants to listen for.
Properties
$expressionTokens
Tokens for terminating expressions, which can be used inline.
private
array<string|int, mixed>
$expressionTokens
= [T_EXIT => T_EXIT, T_THROW => T_THROW]
This is in contrast to terminating statements, which cannot be used inline and would result in a parse error (which is not the concern of this sniff).
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.
register()
Returns an array of tokens this test wants to listen for.
public
register() : array<string|int, int|string>