Code Duplication    Length = 8-8 lines in 2 locations

src/GraphQL/Execution/QueryProcessor.php 2 locations

@@ 365-372 (lines=8) @@
362
   *
363
   * @return mixed
364
   */
365
  protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) {
366
    $root = $config->getRootValue();
367
    if (is_callable($root)) {
368
      $root = $root($params, $document, $operation);
369
    }
370
371
    return $root;
372
  }
373
374
  /**
375
   * @param \GraphQL\Server\ServerConfig $config
@@ 382-389 (lines=8) @@
379
   *
380
   * @return mixed
381
   */
382
  protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) {
383
    $context = $config->getContext();
384
    if (is_callable($context)) {
385
      $context = $context($params, $document, $operation);
386
    }
387
388
    return $context;
389
  }
390
391
  /**
392
   * @param \GraphQL\Server\ServerConfig $config