Documentation

NativeTypeDeclarationCasingFixer extends AbstractFixer
in package

FinalYes

Table of Contents

Constants

CLASS_CONST_SUPPORTED_HINTS  = ['array' => true, 'bool' => true, 'float' => true, 'int' => true, 'iterable' => true, 'mixed' => true, 'null' => true, 'object' => true, 'parent' => true, 'self' => true, 'string' => true, 'static' => true]
CLASS_PROPERTY_SUPPORTED_HINTS  = ['array' => true, 'bool' => true, 'float' => true, 'int' => true, 'iterable' => true, 'mixed' => true, 'null' => true, 'object' => true, 'parent' => true, 'self' => true, 'static' => true, 'string' => true]
TYPE_SEPARATION_TYPES  = [\PhpCsFixer\Tokenizer\CT::T_TYPE_ALTERNATION, \PhpCsFixer\Tokenizer\CT::T_TYPE_INTERSECTION, \PhpCsFixer\Tokenizer\CT::T_DISJUNCTIVE_NORMAL_FORM_TYPE_PARENTHESIS_OPEN, \PhpCsFixer\Tokenizer\CT::T_DISJUNCTIVE_NORMAL_FORM_TYPE_PARENTHESIS_CLOSE]

Properties

$beforePropertyTypeTokens  : array<int, array{: int}|string>
$functionsAnalyzer  : FunctionsAnalyzer
$functionTypeHints  : array<string, true>
https://secure.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.

Methods

__construct()  : mixed
getDefinition()  : FixerDefinitionInterface
isCandidate()  : bool
applyFix()  : void
fixArgumentType()  : void
fixCasing()  : void
fixClassConstantsAndProperties()  : void
fixFunctionArgumentTypes()  : void
fixFunctionReturnType()  : void
fixFunctions()  : void
getConstNameIndex()  : int
getFirstIndexOfType()  : int
getNativeTypeHintCandidatesForConstant()  : iterable<string|int, int>
getNativeTypeHintCandidatesForProperty()  : iterable<string|int, int>
getTypeEnd()  : int
isConstWithoutType()  : bool

Constants

CLASS_CONST_SUPPORTED_HINTS

private mixed CLASS_CONST_SUPPORTED_HINTS = ['array' => true, 'bool' => true, 'float' => true, 'int' => true, 'iterable' => true, 'mixed' => true, 'null' => true, 'object' => true, 'parent' => true, 'self' => true, 'string' => true, 'static' => true]

CLASS_PROPERTY_SUPPORTED_HINTS

private mixed CLASS_PROPERTY_SUPPORTED_HINTS = ['array' => true, 'bool' => true, 'float' => true, 'int' => true, 'iterable' => true, 'mixed' => true, 'null' => true, 'object' => true, 'parent' => true, 'self' => true, 'static' => true, 'string' => true]

TYPE_SEPARATION_TYPES

private mixed TYPE_SEPARATION_TYPES = [\PhpCsFixer\Tokenizer\CT::T_TYPE_ALTERNATION, \PhpCsFixer\Tokenizer\CT::T_TYPE_INTERSECTION, \PhpCsFixer\Tokenizer\CT::T_DISJUNCTIVE_NORMAL_FORM_TYPE_PARENTHESIS_OPEN, \PhpCsFixer\Tokenizer\CT::T_DISJUNCTIVE_NORMAL_FORM_TYPE_PARENTHESIS_CLOSE]

Properties

$functionTypeHints

https://secure.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.

private array<string, true> $functionTypeHints

self PHP 5.0 array PHP 5.1 callable PHP 5.4 bool PHP 7.0 float PHP 7.0 int PHP 7.0 string PHP 7.0 iterable PHP 7.1 void PHP 7.1 object PHP 7.2 static PHP 8.0 (return type only) mixed PHP 8.0 false PHP 8.0 (union return type only) null PHP 8.0 (union return type only) never PHP 8.1 (return type only) true PHP 8.2 (standalone type: https://wiki.php.net/rfc/true-type) false PHP 8.2 (standalone type: https://wiki.php.net/rfc/null-false-standalone-types) null PHP 8.2 (standalone type: https://wiki.php.net/rfc/null-false-standalone-types)

Methods

getNativeTypeHintCandidatesForConstant()

private getNativeTypeHintCandidatesForConstant(Tokens $tokens, int $index) : iterable<string|int, int>
Parameters
$tokens : Tokens
$index : int
Return values
iterable<string|int, int>

getNativeTypeHintCandidatesForProperty()

private getNativeTypeHintCandidatesForProperty(Tokens $tokens, int $index) : iterable<string|int, int>
Parameters
$tokens : Tokens
$index : int
Return values
iterable<string|int, int>

        
On this page

Search results