public static function typeToEnglish($type)
    {
        switch ($type) {
            case self::EOF_TYPE:
                return 'end of template';
            case self::TEXT_TYPE:
                return 'text';
            case self::BLOCK_START_TYPE:
                return 'begin of statement block';
            case self::VAR_START_TYPE:
                return 'begin of print statement';
            case self::BLOCK_END_TYPE:
                return 'end of statement block';
            case self::VAR_END_TYPE:
                return 'end of print statement';
            case self::NAME_TYPE:
                return 'name';
            case self::NUMBER_TYPE:
                return 'number';
            case self::STRING_TYPE:
                return 'string';
            case self::OPERATOR_TYPE:
                return 'operator';
            case self::PUNCTUATION_TYPE:
                return 'punctuation';
            case self::INTERPOLATION_START_TYPE:
                return 'begin of string interpolation';
            case self::INTERPOLATION_END_TYPE:
                return 'end of string interpolation';
            default:
                throw new LogicException(sprintf('Token of type "%s" does not exist.', $type));
        }
    }
public static function typeToEnglish($type)
    {
        switch ($type) {
            case self::EOF_TYPE:
                return 'end of template';
            case self::TEXT_TYPE:
                return 'text';
            case self::BLOCK_START_TYPE:
                return 'begin of statement block';
            case self::VAR_START_TYPE:
                return 'begin of print statement';
            case self::BLOCK_END_TYPE:
                return 'end of statement block';
            case self::VAR_END_TYPE:
                return 'end of print statement';
            case self::NAME_TYPE:
                return 'name';
            case self::NUMBER_TYPE:
                return 'number';
            case self::STRING_TYPE:
                return 'string';
            case self::OPERATOR_TYPE:
                return 'operator';
            case self::PUNCTUATION_TYPE:
                return 'punctuation';
            case self::INTERPOLATION_START_TYPE:
                return 'begin of string interpolation';
            case self::INTERPOLATION_END_TYPE:
                return 'end of string interpolation';
            default:
                throw new LogicException(sprintf('Token of type "%s" does not exist.', $type));
        }
    }
public static function typeToEnglish ( $ type ) { switch ( $ type ) { case self :: EOF_TYPE : return 'end of template' ; case self :: TEXT_TYPE : return 'text' ; case self :: BLOCK_START_TYPE : return 'begin of statement block' ; case self :: VAR_START_TYPE : return 'begin of print statement' ; case self :: BLOCK_END_TYPE : return 'end of statement block' ; case self :: VAR_END_TYPE : return 'end of print statement' ; case self :: NAME_TYPE : return 'name' ; case self :: NUMBER_TYPE : return 'number' ; case self :: STRING_TYPE : return 'string' ; case self :: OPERATOR_TYPE : return 'operator' ; case self :: PUNCTUATION_TYPE : return 'punctuation' ; case self :: INTERPOLATION_START_TYPE : return 'begin of string interpolation' ; case self :: INTERPOLATION_END_TYPE : return 'end of string interpolation' ; default : throw new LogicException ( sprintf ( 'Token of type "%s" does not exist.' , $ type ) ) ; } }
Returns the english representation of a given type.

@param integer $type The type as an integer

@return string The string representation
Returns the english representation of a given type .