protected function errorUnexpectedToken($token)
    {
        $class = new \ReflectionClass($token);
        $constants = array_flip($class->getConstants());

        return new ContainerParserException('unexpected "' . $constants[$token->getType()] . '" given at line ' . $token->getLine());
    }
protected function errorUnexpectedToken($token)
    {
        $class = new \ReflectionClass($token);
        $constants = array_flip($class->getConstants());

        return new ContainerParserException('unexpected "' . $constants[$token->getType()] . '" given at line ' . $token->getLine());
    }
protected function errorUnexpectedToken ( $ token ) { $ class = new \ ReflectionClass ( $ token ) ; $ constants = array_flip ( $ class -> getConstants ( ) ) ; return new ContainerParserException ( 'unexpected "' . $ constants [ $ token -> getType ( ) ] . '" given at line ' . $ token -> getLine ( ) ) ; }
Create new unexpected token exception

@param T                 $token
@return ContainerParserException
Create new unexpected token exception