Code Duplication    Length = 8-8 lines in 2 locations

src/GraphQL/Execution/QueryProcessor.php 2 locations

@@ 276-283 (lines=8) @@
273
   *
274
   * @return callable|mixed
275
   */
276
  protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) {
277
    $root = $config->getRootValue();
278
    if (is_callable($root)) {
279
      $root = $root($params, $document, $operation);
280
    }
281
282
    return $root;
283
  }
284
285
  /**
286
   * @param \GraphQL\Server\ServerConfig $config
@@ 293-300 (lines=8) @@
290
   *
291
   * @return callable|mixed
292
   */
293
  protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) {
294
    $context = $config->getContext();
295
    if (is_callable($context)) {
296
      $context = $context($params, $document, $operation);
297
    }
298
299
    return $context;
300
  }
301
302
  /**
303
   * @param \GraphQL\Server\ServerConfig $config