Code Duplication    Length = 8-9 lines in 2 locations

src/Parser/Parser.php 2 locations

@@ 328-335 (lines=8) @@
325
        return $args;
326
    }
327
328
    protected function parseArgument()
329
    {
330
        $nameToken = $this->eatIdentifierToken();
331
        $this->expect(Token::TYPE_COLON);
332
        $value = $this->parseValue();
333
334
        return new Argument($nameToken->getData(), $value, new Location($nameToken->getLine(), $nameToken->getColumn()));
335
    }
336
337
    protected function parseDirectiveList()
338
    {
@@ 349-357 (lines=9) @@
346
        return $directives;
347
    }
348
349
    protected function parseDirective()
350
    {
351
        $this->expect(Token::TYPE_AT);
352
353
        $nameToken = $this->eatIdentifierToken();
354
        $args      = $this->match(Token::TYPE_LPAREN) ? $this->parseArgumentList() : [];
355
356
        return new Directive($nameToken->getData(), $args, new Location($nameToken->getLine(), $nameToken->getColumn()));
357
    }
358
359
    /**
360
     * @return array|InputList|InputObject|Literal|VariableReference