Code Duplication    Length = 7-9 lines in 2 locations

src/Parser/Parser.php 2 locations

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