src/Language/Parser.php
private function parseInputValueDef()
    {
        $start       = $this->lexer->token;
        $description = $this->parseDescription();
        $name        = $this->parseName();
        $this->expect(Token::COLON);
        $type         = $this->parseTypeReference();
        $defaultValue = null;
        if ($this->skip(Token::EQUALS)) {
            $defaultValue = $this->parseConstValue();
        }
        $directives = $this->parseDirectives(true);

        return new InputValueDefinitionNode([
            'name'         => $name,
            'type'         => $type,
            'defaultValue' => $defaultValue,
            'directives'   => $directives,
            'loc'          => $this->loc($start),
            'description'  => $description,
        ]);
    }
private function parseInputValueDef()
    {
        $start       = $this->lexer->token;
        $description = $this->parseDescription();
        $name        = $this->parseName();
        $this->expect(Token::COLON);
        $type         = $this->parseTypeReference();
        $defaultValue = null;
        if ($this->skip(Token::EQUALS)) {
            $defaultValue = $this->parseConstValue();
        }
        $directives = $this->parseDirectives(true);

        return new InputValueDefinitionNode([
            'name'         => $name,
            'type'         => $type,
            'defaultValue' => $defaultValue,
            'directives'   => $directives,
            'loc'          => $this->loc($start),
            'description'  => $description,
        ]);
    }
private function parseInputValueDef ( ) { $ start = $ this -> lexer -> token ; $ description = $ this -> parseDescription ( ) ; $ name = $ this -> parseName ( ) ; $ this -> expect ( Token :: COLON ) ; $ type = $ this -> parseTypeReference ( ) ; $ defaultValue = null ; if ( $ this -> skip ( Token :: EQUALS ) ) { $ defaultValue = $ this -> parseConstValue ( ) ; } $ directives = $ this -> parseDirectives ( true ) ; return new InputValueDefinitionNode ( [ 'name' => $ name , 'type' => $ type , 'defaultValue' => $ defaultValue , 'directives' => $ directives , 'loc' => $ this -> loc ( $ start ) , 'description' => $ description , ] ) ; }
@return InputValueDefinitionNode

@throws SyntaxError
@return InputValueDefinitionNode