public static function nameByType($type)
    {
        switch ($type) {
            case self::TOKEN_BOOLEAN_FALSE: return 'BOOLEAN_FALSE';
            case self::TOKEN_BOOLEAN_TRUE: return 'BOOLEAN_TRUE';
            case self::TOKEN_BRACE_CLOSE: return 'BRACE_CLOSE';
            case self::TOKEN_BRACE_OPEN: return 'BRACE_OPEN';
            case self::TOKEN_COLON: return 'COLON';
            case self::TOKEN_COMMA: return 'COMMA';
            case self::TOKEN_FLOAT: return 'FLOAT';
            case self::TOKEN_GREATER_THAN: return 'GREATER_THAN';
            case self::TOKEN_INTEGER: return 'INTEGER';
            case self::TOKEN_LESS_THAN: return 'LESS_THAN';
            case self::TOKEN_NULL: return 'NULL';
            case self::TOKEN_PIPE: return 'PIPE';
            case self::TOKEN_PLUS: return 'PLUS';
            case self::TOKEN_SQUARE_BRACKET_CLOSE:
                return 'SQUARE_BRACKET_CLOSE';
            case self::TOKEN_SQUARE_BRACKET_OPEN: return 'SQUARE_BRACKET_OPEN';
            case self::TOKEN_STRING: return 'STRING';
            case self::TOKEN_STRING_QUOTED: return 'STRING_QUOTED';
            case self::TOKEN_TYPE_NAME: return 'TYPE_NAME';
            case self::TOKEN_WHITESPACE: return 'WHITESPACE';
        }

        return null;
    }
public static function nameByType($type)
    {
        switch ($type) {
            case self::TOKEN_BOOLEAN_FALSE: return 'BOOLEAN_FALSE';
            case self::TOKEN_BOOLEAN_TRUE: return 'BOOLEAN_TRUE';
            case self::TOKEN_BRACE_CLOSE: return 'BRACE_CLOSE';
            case self::TOKEN_BRACE_OPEN: return 'BRACE_OPEN';
            case self::TOKEN_COLON: return 'COLON';
            case self::TOKEN_COMMA: return 'COMMA';
            case self::TOKEN_FLOAT: return 'FLOAT';
            case self::TOKEN_GREATER_THAN: return 'GREATER_THAN';
            case self::TOKEN_INTEGER: return 'INTEGER';
            case self::TOKEN_LESS_THAN: return 'LESS_THAN';
            case self::TOKEN_NULL: return 'NULL';
            case self::TOKEN_PIPE: return 'PIPE';
            case self::TOKEN_PLUS: return 'PLUS';
            case self::TOKEN_SQUARE_BRACKET_CLOSE:
                return 'SQUARE_BRACKET_CLOSE';
            case self::TOKEN_SQUARE_BRACKET_OPEN: return 'SQUARE_BRACKET_OPEN';
            case self::TOKEN_STRING: return 'STRING';
            case self::TOKEN_STRING_QUOTED: return 'STRING_QUOTED';
            case self::TOKEN_TYPE_NAME: return 'TYPE_NAME';
            case self::TOKEN_WHITESPACE: return 'WHITESPACE';
        }

        return null;
    }
public static function nameByType ( $ type ) { switch ( $ type ) { case self :: TOKEN_BOOLEAN_FALSE : return 'BOOLEAN_FALSE' ; case self :: TOKEN_BOOLEAN_TRUE : return 'BOOLEAN_TRUE' ; case self :: TOKEN_BRACE_CLOSE : return 'BRACE_CLOSE' ; case self :: TOKEN_BRACE_OPEN : return 'BRACE_OPEN' ; case self :: TOKEN_COLON : return 'COLON' ; case self :: TOKEN_COMMA : return 'COMMA' ; case self :: TOKEN_FLOAT : return 'FLOAT' ; case self :: TOKEN_GREATER_THAN : return 'GREATER_THAN' ; case self :: TOKEN_INTEGER : return 'INTEGER' ; case self :: TOKEN_LESS_THAN : return 'LESS_THAN' ; case self :: TOKEN_NULL : return 'NULL' ; case self :: TOKEN_PIPE : return 'PIPE' ; case self :: TOKEN_PLUS : return 'PLUS' ; case self :: TOKEN_SQUARE_BRACKET_CLOSE : return 'SQUARE_BRACKET_CLOSE' ; case self :: TOKEN_SQUARE_BRACKET_OPEN : return 'SQUARE_BRACKET_OPEN' ; case self :: TOKEN_STRING : return 'STRING' ; case self :: TOKEN_STRING_QUOTED : return 'STRING_QUOTED' ; case self :: TOKEN_TYPE_NAME : return 'TYPE_NAME' ; case self :: TOKEN_WHITESPACE : return 'WHITESPACE' ; } return null ; }
Get the token name from a token type.

@param integer|string $type The type.

@return string|null The name, or null if the type is unknown.
Get the token name from a token type .