Property | Type | Description | |
---|---|---|---|
$arithmeticTokens | array(int) | Tokens that represent arithmetic operators. | |
$assignmentTokens | array(int) | Tokens that represent assignments. | |
$blockOpeners | array(int) | Tokens that open code blocks. | |
$booleanOperators | array(int) | Tokens that perform boolean operations. | |
$bracketTokens | array(int) | Tokens that represent brackets and parenthesis. | |
$castTokens | array(int) | Tokens that represent casting. | |
$commentTokens | array(int) | Tokens that are comments. | |
$comparisonTokens | array(int) | Tokens that represent comparison operator. | |
$emptyTokens | array(int) | Tokens that don't represent code. | |
$equalityTokens | array(int) | Tokens that represent equality comparisons. | |
$functionNameTokens | array(int) | Mostly, these are just strings. But PHP tokeizes some language constructs and functions using their own tokens. | |
$heredocTokens | array(int) | Tokens that make up a heredoc string. | |
$includeTokens | array(int) | Tokens that include files. | |
$knownLengths | The token weightings. | ||
$methodPrefixes | array(int) | Tokens that can prefix a method name | |
$operators | array(int) | Tokens that perform operations. | |
$parenthesisOpeners | array(int) | Token types that open parenthesis. | |
$scopeModifiers | array(int) | Tokens that represent scope modifiers. | |
$scopeOpeners | array(int) | Tokens that are allowed to open scopes. | |
$stringTokens | array(int) | Note that T_STRINGS are NOT represented in this list. | |
$weightings | The token weightings. |
Method | Description | |
---|---|---|
getHighestWeightedToken ( array $tokens ) : integer | Returns the highest weighted token type. |
Method | Description | |
---|---|---|
__construct ( ) | A PHP_CodeSniffer_Tokens class cannot be constructed. |
public static getHighestWeightedToken ( array $tokens ) : integer | ||
$tokens | array | |
return | integer | The highest weighted token. |
public static array(int) $arithmeticTokens | ||
return | array(int) |
public static array(int) $assignmentTokens | ||
return | array(int) |
public static array(int) $blockOpeners | ||
return | array(int) |
public static array(int) $booleanOperators | ||
return | array(int) |
public static array(int) $bracketTokens | ||
return | array(int) |
public static array(int) $castTokens | ||
return | array(int) |
public static array(int) $commentTokens | ||
return | array(int) |
public static array(int) $comparisonTokens | ||
return | array(int) |
public static array(int) $emptyTokens | ||
return | array(int) |
public static array(int) $equalityTokens | ||
return | array(int) |
public static array(int) $functionNameTokens | ||
return | array(int) |
public static array(int) $heredocTokens | ||
return | array(int) |
public static array(int) $includeTokens | ||
return | array(int) |
public static array(int) $methodPrefixes | ||
return | array(int) |
public static array(int) $operators | ||
return | array(int) |
public static array(int) $parenthesisOpeners | ||
return | array(int) |
public static array(int) $scopeModifiers | ||
return | array(int) |
public static array(int) $scopeOpeners | ||
return | array(int) |
public static array(int) $stringTokens | ||
return | array(int) |