Documentation

ValidImplementsViaAbstractSniff extends AbstractArraySniff
in package

FinalYes

Table of Contents

Methods

process()  : void
Processes this sniff, when one of its tokens is encountered.
register()  : array<string|int, int|string>
Returns an array of tokens this test wants to listen for.
processMultiLineArray()  : void
Processes a multi-line array definition.
processSingleLineArray()  : void
Processes a single-line array definition.

Methods

process()

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

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

The current file being checked.

$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 final register() : array<string|int, int|string>
Return values
array<string|int, int|string>

processMultiLineArray()

Processes a multi-line array definition.

protected processMultiLineArray(mixed $phpcsFile, mixed $stackPtr, mixed $arrayStart, mixed $arrayEnd, mixed $indices) : void
Parameters
$phpcsFile : mixed

The current file being checked.

$stackPtr : mixed

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

$arrayStart : mixed

The token that starts the array definition.

$arrayEnd : mixed

The token that ends the array definition.

$indices : mixed

An array of token positions for the array keys, double arrows, and values.

processSingleLineArray()

Processes a single-line array definition.

protected processSingleLineArray(mixed $phpcsFile, mixed $stackPtr, mixed $arrayStart, mixed $arrayEnd, mixed $indices) : void
Parameters
$phpcsFile : mixed

The current file being checked.

$stackPtr : mixed

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

$arrayStart : mixed

The token that starts the array definition.

$arrayEnd : mixed

The token that ends the array definition.

$indices : mixed

An array of token positions for the array keys, double arrows, and values.

On this page

Search results