Documentation

NullableTypeDeclarationSniff
in package
implements Sniff

Table of Contents

Interfaces

Sniff

Constants

VALID_TOKENS  = \PHP_CodeSniffer\Util\Tokens::NAME_TOKENS + [T_CALLABLE => T_CALLABLE, T_SELF => T_SELF, T_PARENT => T_PARENT, T_STATIC => T_STATIC, T_NULL => T_NULL, T_FALSE => T_FALSE, T_TRUE => T_TRUE]
An array of valid tokens after `T_NULLABLE` occurrences.

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.

Constants

VALID_TOKENS

An array of valid tokens after `T_NULLABLE` occurrences.

private array<int|string, int|string> VALID_TOKENS = \PHP_CodeSniffer\Util\Tokens::NAME_TOKENS + [T_CALLABLE => T_CALLABLE, T_SELF => T_SELF, T_PARENT => T_PARENT, T_STATIC => T_STATIC, T_NULL => T_NULL, T_FALSE => T_FALSE, T_TRUE => T_TRUE]

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>
Return values
array<string|int, int|string>

        
On this page

Search results