TypeSeparatorSpacingSniff
in package
implements
Sniff
FinalYes
Enforce spacing rules around union, intersection and DNF type separators.
Tags
Table of Contents
Interfaces
Properties
- $targetTokens : array<int|string, int|string>
- Tokens this sniff targets.
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
$targetTokens
Tokens this sniff targets.
private
array<int|string, int|string>
$targetTokens
= [\T_TYPE_UNION => \T_TYPE_UNION, \T_TYPE_INTERSECTION => \T_TYPE_INTERSECTION, \T_TYPE_OPEN_PARENTHESIS => \T_TYPE_OPEN_PARENTHESIS, \T_TYPE_CLOSE_PARENTHESIS => \T_TYPE_CLOSE_PARENTHESIS]
Tags
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.
Tags
register()
Returns an array of tokens this test wants to listen for.
public
register() : array<string|int, int|string>