Code Duplication    Length = 7-9 lines in 2 locations

src/Parser/Parser.php 2 locations

@@ 294-300 (lines=7) @@
291
                throw $this->createUnexpectedTokenTypeException($this->lookAhead->getType());
292
            }
293
294
            if ($type === Token::TYPE_QUERY) {
295
                return new Query($nameToken->getData(), $alias, $arguments, $fields, $directives, $bodyLocation);
296
            } elseif ($type === Token::TYPE_TYPED_FRAGMENT) {
297
                return new TypedFragmentReference($nameToken->getData(), $fields, $directives, $bodyLocation);
298
            } else {
299
                return new Mutation($nameToken->getData(), $alias, $arguments, $fields, $directives, $bodyLocation);
300
            }
301
        } else {
302
            if ($highLevel && $type === Token::TYPE_MUTATION) {
303
                return new Mutation($nameToken->getData(), $alias, $arguments, [], $directives, $bodyLocation);
@@ 301-309 (lines=9) @@
298
            } else {
299
                return new Mutation($nameToken->getData(), $alias, $arguments, $fields, $directives, $bodyLocation);
300
            }
301
        } else {
302
            if ($highLevel && $type === Token::TYPE_MUTATION) {
303
                return new Mutation($nameToken->getData(), $alias, $arguments, [], $directives, $bodyLocation);
304
            } elseif ($highLevel && $type === Token::TYPE_QUERY) {
305
                return new Query($nameToken->getData(), $alias, $arguments, [], $directives, $bodyLocation);
306
            }
307
308
            return new Field($nameToken->getData(), $alias, $arguments, $directives, $bodyLocation);
309
        }
310
    }
311
312
    protected function parseArgumentList()