PhpCss\Scanner\Token::typeToString PHP Method

typeToString() public static method

Return string representation of token type
public static typeToString ( integer $type ) : string
$type integer
return string
    public static function typeToString($type)
    {
        return self::$_names[$type];
    }

Usage Example

 /**
  * @param array(PhpCss\Scanner\Token) $expectedTokens
  */
 public function __construct(array $expectedTokens)
 {
     $this->_expectedTokens = $expectedTokens;
     $expectedTokenStrings = array();
     foreach ($expectedTokens as $expectedToken) {
         $expectedTokenStrings[] = PhpCss\Scanner\Token::typeToString($expectedToken);
     }
     parent::__construct('Parse error: Unexpected end of file was found while one of ' . implode(", ", $expectedTokenStrings) . ' was expected.');
 }
All Usage Examples Of PhpCss\Scanner\Token::typeToString