Collections
in package
Collections of related tokens as often used and needed for sniffs.
These are additional "token groups" to compliment the ones available through the PHPCS native Tokens class.
Tags
Table of Contents
- $alternativeControlStructureSyntaxCloserTokens : array<string|int, mixed>
- DEPRECATED: Tokens representing alternative control structure syntax closer keywords.
- $alternativeControlStructureSyntaxTokens : array<string|int, mixed>
- DEPRECATED: Tokens for control structures which can use the alternative control structure syntax.
- $arrayTokens : array<string|int, mixed>
- DEPRECATED: Tokens which are used to create arrays.
- $arrayTokensBC : array<string|int, mixed>
- DEPRECATED: Tokens which are used to create arrays (PHPCS cross-version compatible).
- $classModifierKeywords : array<string|int, mixed>
- DEPRECATED: Modifier keywords which can be used for a class declaration.
- $closedScopes : array<string|int, mixed>
- DEPRECATED: List of tokens which represent "closed" scopes.
- $controlStructureTokens : array<string|int, mixed>
- DEPRECATED: Control structure tokens.
- $incrementDecrementOperators : array<string|int, mixed>
- DEPRECATED: Increment/decrement operator tokens.
- $listTokens : array<string|int, mixed>
- DEPRECATED: Tokens which are used to create lists.
- $listTokensBC : array<string|int, mixed>
- DEPRECATED: Tokens which are used to create lists (PHPCS cross-version compatible).
- $magicConstants : array<string|int, mixed>
- DEPRECATED: Tokens for the PHP magic constants.
- $namespaceDeclarationClosers : array<string|int, mixed>
- DEPRECATED: List of tokens which can end a namespace declaration statement.
- $objectOperators : array<string|int, mixed>
- DEPRECATED: Object operator tokens.
- $OOCanExtend : array<string|int, mixed>
- DEPRECATED: OO structures which can use the "extends" keyword.
- $OOCanImplement : array<string|int, mixed>
- DEPRECATED: OO structures which can use the "implements" keyword.
- $OOConstantScopes : array<string|int, mixed>
- DEPRECATED: OO scopes in which constants can be declared.
- $OOHierarchyKeywords : array<string|int, mixed>
- DEPRECATED: Tokens types used for "forwarding" calls within OO structures.
- $OONameTokens : array<string|int, mixed>
- DEPRECATED: Tokens types which can be encountered in the fully/partially qualified name of an OO structure.
- $OOPropertyScopes : array<string|int, mixed>
- DEPRECATED: OO scopes in which properties can be declared.
- $parameterTypeTokens : array<string|int, mixed>
- DEPRECATED: Token types which can be encountered in a parameter type declaration.
- $propertyModifierKeywords : array<string|int, mixed>
- DEPRECATED: Modifier keywords which can be used for a property declaration.
- $propertyTypeTokens : array<string|int, mixed>
- DEPRECATED: Token types which can be encountered in a property type declaration.
- $returnTypeTokens : array<string|int, mixed>
- DEPRECATED: Token types which can be encountered in a return type declaration.
- $shortArrayTokens : array<string|int, mixed>
- DEPRECATED: Tokens which are used for short arrays.
- $shortArrayTokensBC : array<string|int, mixed>
- DEPRECATED: Tokens which are used for short arrays (PHPCS cross-version compatible).
- $shortListTokens : array<string|int, mixed>
- DEPRECATED: Tokens which are used for short lists.
- $shortListTokensBC : array<string|int, mixed>
- DEPRECATED: Tokens which are used for short lists (PHPCS cross-version compatible).
- $textStingStartTokens : array<string|int, mixed>
- DEPRECATED: Tokens which can start a - potentially multi-line - text string.
- __callStatic() : array<string|int, mixed>
- Handle calls to (undeclared) methods for token arrays which don't need special handling.
- alternativeControlStructureSyntaxClosers() : array<string|int, mixed>
- Tokens representing alternative control structure syntax closer keywords.
- alternativeControlStructureSyntaxes() : array<string|int, mixed>
- Tokens for control structures which can use the alternative control structure syntax.
- arrayOpenTokensBC() : array<string|int, mixed>
- arrayTokens() : array<string|int, mixed>
- arrayTokensBC() : array<string|int, mixed>
- arrowFunctionTokensBC() : array<string|int, mixed>
- DEPRECATED: Tokens which can represent the arrow function keyword.
- classModifierKeywords() : array<string|int, mixed>
- closedScopes() : array<string|int, mixed>
- controlStructureTokens() : array<string|int, mixed>
- functionCallTokens() : array<string|int, mixed>
- Tokens which can represent function calls and function-call-like language constructs.
- functionDeclarationTokens() : array<string|int, mixed>
- functionDeclarationTokensBC() : array<string|int, mixed>
- DEPRECATED: Tokens which represent a keyword which starts a function declaration.
- incrementDecrementOperators() : array<string|int, mixed>
- listTokens() : array<string|int, mixed>
- listTokensBC() : array<string|int, mixed>
- namespaceDeclarationClosers() : array<string|int, mixed>
- namespacedNameTokens() : array<string|int, mixed>
- Tokens types which can be encountered in a fully, partially or unqualified name.
- nameTokens() : array<string|int, mixed>
- objectOperators() : array<string|int, mixed>
- ooCanExtend() : array<string|int, mixed>
- OO structures which can use the "extends" keyword.
- ooCanImplement() : array<string|int, mixed>
- OO structures which can use the "implements" keyword.
- ooConstantScopes() : array<string|int, mixed>
- OO scopes in which constants can be declared.
- ooHierarchyKeywords() : array<string|int, mixed>
- Tokens types used for "forwarding" calls within OO structures.
- ooPropertyScopes() : array<string|int, mixed>
- OO scopes in which properties can be declared.
- parameterPassingTokens() : array<string|int, mixed>
- Tokens which can be passed to the methods in the PassedParameter class.
- parameterTypeTokens() : array<string|int, mixed>
- Token types which can be encountered in a parameter type declaration.
- parameterTypeTokensBC() : array<string|int, mixed>
- DEPRECATED: Token types which can be encountered in a parameter type declaration (cross-version).
- phpOpenTags() : array<string|int, mixed>
- propertyModifierKeywords() : array<string|int, mixed>
- propertyTypeTokens() : array<string|int, mixed>
- Token types which can be encountered in a property type declaration.
- propertyTypeTokensBC() : array<string|int, mixed>
- DEPRECATED: Token types which can be encountered in a property type declaration (cross-version).
- returnTypeTokens() : array<string|int, mixed>
- Token types which can be encountered in a return type declaration.
- returnTypeTokensBC() : array<string|int, mixed>
- DEPRECATED: Token types which can be encountered in a return type declaration (cross-version).
- shortArrayListOpenTokensBC() : array<string|int, mixed>
- shortArrayTokens() : array<string|int, mixed>
- shortArrayTokensBC() : array<string|int, mixed>
- shortListTokens() : array<string|int, mixed>
- shortListTokensBC() : array<string|int, mixed>
- textStringStartTokens() : array<string|int, mixed>
- Tokens which can start a - potentially multi-line - text string.
Properties
$alternativeControlStructureSyntaxCloserTokens
DEPRECATED: Tokens representing alternative control structure syntax closer keywords.
public
static array<string|int, mixed>
$alternativeControlStructureSyntaxCloserTokens
= [\T_ENDIF => \T_ENDIF, \T_ENDFOR => \T_ENDFOR, \T_ENDFOREACH => \T_ENDFOREACH, \T_ENDWHILE => \T_ENDWHILE, \T_ENDSWITCH => \T_ENDSWITCH, \T_ENDDECLARE => \T_ENDDECLARE]
Tags
$alternativeControlStructureSyntaxTokens
DEPRECATED: Tokens for control structures which can use the alternative control structure syntax.
public
static array<string|int, mixed>
$alternativeControlStructureSyntaxTokens
= [\T_IF => \T_IF, \T_ELSEIF => \T_ELSEIF, \T_ELSE => \T_ELSE, \T_FOR => \T_FOR, \T_FOREACH => \T_FOREACH, \T_SWITCH => \T_SWITCH, \T_WHILE => \T_WHILE, \T_DECLARE => \T_DECLARE]
Tags
$arrayTokens
DEPRECATED: Tokens which are used to create arrays.
public
static array<string|int, mixed>
$arrayTokens
= [\T_ARRAY => \T_ARRAY, \T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY]
<int|string> => <int|string>
Tags
$arrayTokensBC
DEPRECATED: Tokens which are used to create arrays (PHPCS cross-version compatible).
public
static array<string|int, mixed>
$arrayTokensBC
= [\T_ARRAY => \T_ARRAY, \T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY, \T_OPEN_SQUARE_BRACKET => \T_OPEN_SQUARE_BRACKET, \T_CLOSE_SQUARE_BRACKET => \T_CLOSE_SQUARE_BRACKET]
Includes T_OPEN_SQUARE_BRACKET
and T_CLOSE_SQUARE_BRACKET
to allow for handling
intermittent tokenizer issues related to the retokenization to T_OPEN_SHORT_ARRAY
.
Should only be used selectively.
<int|string> => <int|string>
Tags
$classModifierKeywords
DEPRECATED: Modifier keywords which can be used for a class declaration.
public
static array<string|int, mixed>
$classModifierKeywords
= [\T_FINAL => \T_FINAL, \T_ABSTRACT => \T_ABSTRACT, \T_READONLY => \T_READONLY]
<int|string> => <int|string>
Tags
$closedScopes
DEPRECATED: List of tokens which represent "closed" scopes.
public
static array<string|int, mixed>
$closedScopes
= [\T_CLASS => \T_CLASS, \T_ANON_CLASS => \T_ANON_CLASS, \T_INTERFACE => \T_INTERFACE, \T_TRAIT => \T_TRAIT, \T_ENUM => \T_ENUM, \T_FUNCTION => \T_FUNCTION, \T_CLOSURE => \T_CLOSURE]
I.e. anything declared within that scope - except for other closed scopes - is outside of the global namespace.
This list doesn't contain the T_NAMESPACE
token on purpose as variables declared
within a namespace scope are still global and not limited to that namespace.
<int|string> => <int|string>
Tags
$controlStructureTokens
DEPRECATED: Control structure tokens.
public
static array<string|int, mixed>
$controlStructureTokens
= [\T_IF => \T_IF, \T_ELSEIF => \T_ELSEIF, \T_ELSE => \T_ELSE, \T_FOR => \T_FOR, \T_FOREACH => \T_FOREACH, \T_SWITCH => \T_SWITCH, \T_DO => \T_DO, \T_WHILE => \T_WHILE, \T_DECLARE => \T_DECLARE, \T_MATCH => \T_MATCH]
Tags
$incrementDecrementOperators
DEPRECATED: Increment/decrement operator tokens.
public
static array<string|int, mixed>
$incrementDecrementOperators
= [\T_DEC => \T_DEC, \T_INC => \T_INC]
Tags
$listTokens
DEPRECATED: Tokens which are used to create lists.
public
static array<string|int, mixed>
$listTokens
= [\T_LIST => \T_LIST, \T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY]
<int|string> => <int|string>
Tags
$listTokensBC
DEPRECATED: Tokens which are used to create lists (PHPCS cross-version compatible).
public
static array<string|int, mixed>
$listTokensBC
= [\T_LIST => \T_LIST, \T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY, \T_OPEN_SQUARE_BRACKET => \T_OPEN_SQUARE_BRACKET, \T_CLOSE_SQUARE_BRACKET => \T_CLOSE_SQUARE_BRACKET]
Includes T_OPEN_SQUARE_BRACKET
and T_CLOSE_SQUARE_BRACKET
to allow for handling
intermittent tokenizer issues related to the retokenization to T_OPEN_SHORT_ARRAY
.
Should only be used selectively.
<int|string> => <int|string>
Tags
$magicConstants
DEPRECATED: Tokens for the PHP magic constants.
public
static array<string|int, mixed>
$magicConstants
= [\T_CLASS_C => \T_CLASS_C, \T_DIR => \T_DIR, \T_FILE => \T_FILE, \T_FUNC_C => \T_FUNC_C, \T_LINE => \T_LINE, \T_METHOD_C => \T_METHOD_C, \T_NS_C => \T_NS_C, \T_TRAIT_C => \T_TRAIT_C]
<int|string> => <int|string>
Tags
$namespaceDeclarationClosers
DEPRECATED: List of tokens which can end a namespace declaration statement.
public
static array<string|int, mixed>
$namespaceDeclarationClosers
= [\T_SEMICOLON => \T_SEMICOLON, \T_OPEN_CURLY_BRACKET => \T_OPEN_CURLY_BRACKET, \T_CLOSE_TAG => \T_CLOSE_TAG]
<int|string> => <int|string>
Tags
$objectOperators
DEPRECATED: Object operator tokens.
public
static array<string|int, mixed>
$objectOperators
= [\T_DOUBLE_COLON => \T_DOUBLE_COLON, \T_OBJECT_OPERATOR => \T_OBJECT_OPERATOR, \T_NULLSAFE_OBJECT_OPERATOR => \T_NULLSAFE_OBJECT_OPERATOR]
Tags
$OOCanExtend
DEPRECATED: OO structures which can use the "extends" keyword.
public
static array<string|int, mixed>
$OOCanExtend
= [\T_CLASS => \T_CLASS, \T_ANON_CLASS => \T_ANON_CLASS, \T_INTERFACE => \T_INTERFACE]
<int|string> => <int|string>
Tags
$OOCanImplement
DEPRECATED: OO structures which can use the "implements" keyword.
public
static array<string|int, mixed>
$OOCanImplement
= [\T_CLASS => \T_CLASS, \T_ANON_CLASS => \T_ANON_CLASS, \T_ENUM => \T_ENUM]
<int|string> => <int|string>
Tags
$OOConstantScopes
DEPRECATED: OO scopes in which constants can be declared.
public
static array<string|int, mixed>
$OOConstantScopes
= [\T_CLASS => \T_CLASS, \T_ANON_CLASS => \T_ANON_CLASS, \T_INTERFACE => \T_INTERFACE, \T_ENUM => \T_ENUM, \T_TRAIT => \T_TRAIT]
Note: traits can only declare constants since PHP 8.2.
<int|string> => <int|string>
Tags
$OOHierarchyKeywords
DEPRECATED: Tokens types used for "forwarding" calls within OO structures.
public
static array<string|int, mixed>
$OOHierarchyKeywords
= [\T_PARENT => \T_PARENT, \T_SELF => \T_SELF, \T_STATIC => \T_STATIC]
<int|string> => <int|string>
Tags
$OONameTokens
DEPRECATED: Tokens types which can be encountered in the fully/partially qualified name of an OO structure.
public
static array<string|int, mixed>
$OONameTokens
= [\T_NS_SEPARATOR => \T_NS_SEPARATOR, \T_STRING => \T_STRING, \T_NAMESPACE => \T_NAMESPACE]
<int|string> => <int|string>
Tags
$OOPropertyScopes
DEPRECATED: OO scopes in which properties can be declared.
public
static array<string|int, mixed>
$OOPropertyScopes
= [\T_CLASS => \T_CLASS, \T_ANON_CLASS => \T_ANON_CLASS, \T_TRAIT => \T_TRAIT]
Note: interfaces can not declare properties.
<int|string> => <int|string>
Tags
$parameterTypeTokens
DEPRECATED: Token types which can be encountered in a parameter type declaration.
public
static array<string|int, mixed>
$parameterTypeTokens
= [\T_CALLABLE => \T_CALLABLE, \T_SELF => \T_SELF, \T_PARENT => \T_PARENT, \T_FALSE => \T_FALSE, \T_TRUE => \T_TRUE, \T_NULL => \T_NULL, \T_STRING => \T_STRING, \T_NS_SEPARATOR => \T_NS_SEPARATOR, \T_TYPE_UNION => \T_TYPE_UNION, \T_TYPE_INTERSECTION => \T_TYPE_INTERSECTION]
<int|string> => <int|string>
Tags
$propertyModifierKeywords
DEPRECATED: Modifier keywords which can be used for a property declaration.
public
static array<string|int, mixed>
$propertyModifierKeywords
= [\T_PUBLIC => \T_PUBLIC, \T_PRIVATE => \T_PRIVATE, \T_PROTECTED => \T_PROTECTED, \T_STATIC => \T_STATIC, \T_VAR => \T_VAR, \T_READONLY => \T_READONLY]
<int|string> => <int|string>
Tags
$propertyTypeTokens
DEPRECATED: Token types which can be encountered in a property type declaration.
public
static array<string|int, mixed>
$propertyTypeTokens
= [\T_CALLABLE => \T_CALLABLE, \T_SELF => \T_SELF, \T_PARENT => \T_PARENT, \T_FALSE => \T_FALSE, \T_TRUE => \T_TRUE, \T_NULL => \T_NULL, \T_STRING => \T_STRING, \T_NS_SEPARATOR => \T_NS_SEPARATOR, \T_TYPE_UNION => \T_TYPE_UNION, \T_TYPE_INTERSECTION => \T_TYPE_INTERSECTION]
<int|string> => <int|string>
Tags
$returnTypeTokens
DEPRECATED: Token types which can be encountered in a return type declaration.
public
static array<string|int, mixed>
$returnTypeTokens
= [\T_CALLABLE => \T_CALLABLE, \T_SELF => \T_SELF, \T_PARENT => \T_PARENT, \T_STATIC => \T_STATIC, \T_FALSE => \T_FALSE, \T_TRUE => \T_TRUE, \T_NULL => \T_NULL, \T_STRING => \T_STRING, \T_NS_SEPARATOR => \T_NS_SEPARATOR, \T_TYPE_UNION => \T_TYPE_UNION, \T_TYPE_INTERSECTION => \T_TYPE_INTERSECTION]
<int|string> => <int|string>
Tags
$shortArrayTokens
DEPRECATED: Tokens which are used for short arrays.
public
static array<string|int, mixed>
$shortArrayTokens
= [\T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY]
<int|string> => <int|string>
Tags
$shortArrayTokensBC
DEPRECATED: Tokens which are used for short arrays (PHPCS cross-version compatible).
public
static array<string|int, mixed>
$shortArrayTokensBC
= [\T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY, \T_OPEN_SQUARE_BRACKET => \T_OPEN_SQUARE_BRACKET, \T_CLOSE_SQUARE_BRACKET => \T_CLOSE_SQUARE_BRACKET]
Includes T_OPEN_SQUARE_BRACKET
and T_CLOSE_SQUARE_BRACKET
to allow for handling
intermittent tokenizer issues related to the retokenization to T_OPEN_SHORT_ARRAY
.
Should only be used selectively.
<int|string> => <int|string>
Tags
$shortListTokens
DEPRECATED: Tokens which are used for short lists.
public
static array<string|int, mixed>
$shortListTokens
= [\T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY]
<int|string> => <int|string>
Tags
$shortListTokensBC
DEPRECATED: Tokens which are used for short lists (PHPCS cross-version compatible).
public
static array<string|int, mixed>
$shortListTokensBC
= [\T_OPEN_SHORT_ARRAY => \T_OPEN_SHORT_ARRAY, \T_CLOSE_SHORT_ARRAY => \T_CLOSE_SHORT_ARRAY, \T_OPEN_SQUARE_BRACKET => \T_OPEN_SQUARE_BRACKET, \T_CLOSE_SQUARE_BRACKET => \T_CLOSE_SQUARE_BRACKET]
Includes T_OPEN_SQUARE_BRACKET
and T_CLOSE_SQUARE_BRACKET
to allow for handling
intermittent tokenizer issues related to the retokenization to T_OPEN_SHORT_ARRAY
.
Should only be used selectively.
<int|string> => <int|string>
Tags
$textStingStartTokens
DEPRECATED: Tokens which can start a - potentially multi-line - text string.
public
static array<string|int, mixed>
$textStingStartTokens
= [\T_START_HEREDOC => \T_START_HEREDOC, \T_START_NOWDOC => \T_START_NOWDOC, \T_CONSTANT_ENCAPSED_STRING => \T_CONSTANT_ENCAPSED_STRING, \T_DOUBLE_QUOTED_STRING => \T_DOUBLE_QUOTED_STRING]
<int|string> => <int|string>
Tags
Methods
__callStatic()
Handle calls to (undeclared) methods for token arrays which don't need special handling.
public
static __callStatic(string $name, array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
- $name : string
-
The name of the method which has been called.
- $args : array<string|int, mixed>
-
Any arguments passed to the method. Unused as none of the methods take arguments.
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string> Token array
alternativeControlStructureSyntaxClosers()
Tokens representing alternative control structure syntax closer keywords.
public
static alternativeControlStructureSyntaxClosers() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —alternativeControlStructureSyntaxes()
Tokens for control structures which can use the alternative control structure syntax.
public
static alternativeControlStructureSyntaxes() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —arrayOpenTokensBC()
public
static arrayOpenTokensBC() : array<string|int, mixed>
Tokens which can open an array (PHPCS cross-version compatible).
Return values
array<string|int, mixed> —arrayTokens()
public
static arrayTokens() : array<string|int, mixed>
Tokens which are used to create arrays.
Return values
array<string|int, mixed> —arrayTokensBC()
public
static arrayTokensBC() : array<string|int, mixed>
Tokens which are used to create arrays (PHPCS cross-version compatible).
Return values
array<string|int, mixed> —arrowFunctionTokensBC()
DEPRECATED: Tokens which can represent the arrow function keyword.
public
static arrowFunctionTokensBC() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
classModifierKeywords()
public
static classModifierKeywords() : array<string|int, mixed>
Modifier keywords which can be used for a class declaration.
Return values
array<string|int, mixed> —closedScopes()
public
static closedScopes() : array<string|int, mixed>
List of tokens which represent "closed" scopes.
Return values
array<string|int, mixed> —controlStructureTokens()
public
static controlStructureTokens() : array<string|int, mixed>
Control structure tokens.
Return values
array<string|int, mixed> —functionCallTokens()
Tokens which can represent function calls and function-call-like language constructs.
public
static functionCallTokens() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
functionDeclarationTokens()
public
static functionDeclarationTokens() : array<string|int, mixed>
Tokens which represent a keyword which starts a function declaration.
Return values
array<string|int, mixed> —functionDeclarationTokensBC()
DEPRECATED: Tokens which represent a keyword which starts a function declaration.
public
static functionDeclarationTokensBC() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
incrementDecrementOperators()
public
static incrementDecrementOperators() : array<string|int, mixed>
Increment/decrement operator tokens.
Return values
array<string|int, mixed> —listTokens()
public
static listTokens() : array<string|int, mixed>
Tokens which are used to create lists.
Return values
array<string|int, mixed> —listTokensBC()
public
static listTokensBC() : array<string|int, mixed>
Tokens which are used to create lists (PHPCS cross-version compatible)
Return values
array<string|int, mixed> —namespaceDeclarationClosers()
public
static namespaceDeclarationClosers() : array<string|int, mixed>
List of tokens which can end a namespace declaration statement.
Return values
array<string|int, mixed> —namespacedNameTokens()
Tokens types which can be encountered in a fully, partially or unqualified name.
public
static namespacedNameTokens() : array<string|int, mixed>
Example:
echo namespace\Sub\ClassName::method();
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
nameTokens()
public
static nameTokens() : array<string|int, mixed>
Tokens used for "names", be it namespace, OO, function or constant names.
Return values
array<string|int, mixed> —objectOperators()
public
static objectOperators() : array<string|int, mixed>
Object operator tokens.
Return values
array<string|int, mixed> —ooCanExtend()
OO structures which can use the "extends" keyword.
public
static ooCanExtend() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
ooCanImplement()
OO structures which can use the "implements" keyword.
public
static ooCanImplement() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
ooConstantScopes()
OO scopes in which constants can be declared.
public
static ooConstantScopes() : array<string|int, mixed>
Note: traits can only declare constants since PHP 8.2.
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
ooHierarchyKeywords()
Tokens types used for "forwarding" calls within OO structures.
public
static ooHierarchyKeywords() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
ooPropertyScopes()
OO scopes in which properties can be declared.
public
static ooPropertyScopes() : array<string|int, mixed>
Note: interfaces can not declare properties.
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
parameterPassingTokens()
Tokens which can be passed to the methods in the PassedParameter class.
public
static parameterPassingTokens() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
parameterTypeTokens()
Token types which can be encountered in a parameter type declaration.
public
static parameterTypeTokens() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
parameterTypeTokensBC()
DEPRECATED: Token types which can be encountered in a parameter type declaration (cross-version).
public
static parameterTypeTokensBC() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
phpOpenTags()
public
static phpOpenTags() : array<string|int, mixed>
Tokens which open PHP.
Return values
array<string|int, mixed> —propertyModifierKeywords()
public
static propertyModifierKeywords() : array<string|int, mixed>
Modifier keywords which can be used for a property declaration.
Return values
array<string|int, mixed> —propertyTypeTokens()
Token types which can be encountered in a property type declaration.
public
static propertyTypeTokens() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
propertyTypeTokensBC()
DEPRECATED: Token types which can be encountered in a property type declaration (cross-version).
public
static propertyTypeTokensBC() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
returnTypeTokens()
Token types which can be encountered in a return type declaration.
public
static returnTypeTokens() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
returnTypeTokensBC()
DEPRECATED: Token types which can be encountered in a return type declaration (cross-version).
public
static returnTypeTokensBC() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>
shortArrayListOpenTokensBC()
public
static shortArrayListOpenTokensBC() : array<string|int, mixed>
Tokens which can open a short array or short list (PHPCS cross-version compatible).
Return values
array<string|int, mixed> —shortArrayTokens()
public
static shortArrayTokens() : array<string|int, mixed>
Tokens which are used for short arrays.
Return values
array<string|int, mixed> —shortArrayTokensBC()
public
static shortArrayTokensBC() : array<string|int, mixed>
Tokens which are used for short arrays (PHPCS cross-version compatible).
Return values
array<string|int, mixed> —shortListTokens()
public
static shortListTokens() : array<string|int, mixed>
Tokens which are used for short lists.
Return values
array<string|int, mixed> —shortListTokensBC()
public
static shortListTokensBC() : array<string|int, mixed>
Tokens which are used for short lists (PHPCS cross-version compatible).
Return values
array<string|int, mixed> —textStringStartTokens()
Tokens which can start a - potentially multi-line - text string.
public
static textStringStartTokens() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —<int|string> => <int|string>