Code Duplication    Length = 8-9 lines in 2 locations

src/Parser/Parser.php 2 locations

@@ 323-330 (lines=8) @@
320
        return $args;
321
    }
322
323
    protected function parseArgument()
324
    {
325
        $nameToken = $this->eatIdentifierToken();
326
        $this->expect(Token::TYPE_COLON);
327
        $value = $this->parseValue();
328
329
        return new Argument($nameToken->getData(), $value, new Location($nameToken->getLine(), $nameToken->getColumn()));
330
    }
331
332
    protected function parseDirectiveList()
333
    {
@@ 344-352 (lines=9) @@
341
        return $directives;
342
    }
343
344
    protected function parseDirective()
345
    {
346
        $this->expect(Token::TYPE_AT);
347
348
        $nameToken = $this->eatIdentifierToken();
349
        $args      = $this->match(Token::TYPE_LPAREN) ? $this->parseArgumentList() : [];
350
351
        return new Directive($nameToken->getData(), $args, new Location($nameToken->getLine(), $nameToken->getColumn()));
352
    }
353
354
    /**
355
     * @return array|InputList|InputObject|Literal|VariableReference