Documentation

ArbitraryParenthesesSpacingSniff
in package
implements Sniff

Table of Contents

Interfaces

Sniff

Constants

IGNORE_TOKENS  = \PHP_CodeSniffer\Util\Tokens::FUNCTION_NAME_TOKENS + [T_VARIABLE => T_VARIABLE, T_CLOSE_PARENTHESIS => T_CLOSE_PARENTHESIS, T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, T_CLOSE_SQUARE_BRACKET => T_CLOSE_SQUARE_BRACKET, T_CLOSE_SHORT_ARRAY => T_CLOSE_SHORT_ARRAY, T_THROW => T_THROW, T_YIELD => T_YIELD, T_YIELD_FROM => T_YIELD_FROM, T_CLONE => T_CLONE]
Tokens which when they precede an open parenthesis indicate that this is a type of structure this sniff should ignore.

Properties

$ignoreNewlines  : bool
Allow newlines instead of spaces.
$spacing  : int
The number of spaces desired on the inside of the parentheses.

Methods

process()  : void|int
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.

Constants

IGNORE_TOKENS

Tokens which when they precede an open parenthesis indicate that this is a type of structure this sniff should ignore.

private array<int|string, int|string> IGNORE_TOKENS = \PHP_CodeSniffer\Util\Tokens::FUNCTION_NAME_TOKENS + [T_VARIABLE => T_VARIABLE, T_CLOSE_PARENTHESIS => T_CLOSE_PARENTHESIS, T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, T_CLOSE_SQUARE_BRACKET => T_CLOSE_SQUARE_BRACKET, T_CLOSE_SHORT_ARRAY => T_CLOSE_SHORT_ARRAY, T_THROW => T_THROW, T_YIELD => T_YIELD, T_YIELD_FROM => T_YIELD_FROM, T_CLONE => T_CLONE]

Properties

Methods

process()

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

public process(File $phpcsFile, int $stackPtr) : void|int
Parameters
$phpcsFile : File

All the tokens found in the document.

$stackPtr : int

The position of the current token in the stack passed in $tokens.

Return values
void|int

register()

Returns an array of tokens this test wants to listen for.

public register() : array<string|int, int|string>
Return values
array<string|int, int|string>

        
On this page

Search results