src/Language/Parser.php
protected function expectKeyword($value)
    {
        if ($this->token->getType() !== Token::NAME_TYPE || $this->token->getValue() !== $value) {
            throw new \Exception(sprintf('Expected %s, found %s', $value, $this->token->getDescription()));
        }

        return $this->advance();
    }
protected function expectKeyword($value)
    {
        if ($this->token->getType() !== Token::NAME_TYPE || $this->token->getValue() !== $value) {
            throw new \Exception(sprintf('Expected %s, found %s', $value, $this->token->getDescription()));
        }

        return $this->advance();
    }
protected function expectKeyword ( $ value ) { if ( $ this -> token -> getType ( ) !== Token :: NAME_TYPE || $ this -> token -> getValue ( ) !== $ value ) { throw new \ Exception ( sprintf ( 'Expected %s, found %s' , $ value , $ this -> token -> getDescription ( ) ) ) ; } return $ this -> advance ( ) ; }
If the next token is a keyword with the given value, return that token
after advancing the parser. Otherwise, do not change the parser state and
return false.

@param string $value

@return \Fubhy\GraphQL\Language\Token

@throws \Exception
If the next token is a keyword with the given value return that token after advancing the parser . Otherwise do not change the parser state and return false .