Code Duplication    Length = 10-10 lines in 2 locations

src/GraphQL/CacheableEdgeTrait.php 2 locations

@@ 19-28 (lines=10) @@
16
  /**
17
   * {@inheritdoc}
18
   */
19
  public function getSchemaCacheMetadata(AbstractSchema $schema) {
20
    if ($schema instanceof PluggableSchemaPluginInterface) {
21
      /** @var \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface $plugin */
22
      if ($plugin = $this->getPlugin($schema->getSchemaBuilder())) {
23
        return $plugin->getSchemaCacheMetadata();
24
      }
25
    }
26
27
    return NULL;
28
  }
29
30
  /**
31
   * {@inheritdoc}
@@ 33-42 (lines=10) @@
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function getResponseCacheMetadata(AbstractSchema $schema) {
34
    if ($schema instanceof PluggableSchemaPluginInterface) {
35
      /** @var \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface $plugin */
36
      if ($plugin = $this->getPlugin($schema->getSchemaBuilder())) {
37
        return $plugin->getSchemaCacheMetadata();
38
      }
39
    }
40
41
    return NULL;
42
  }
43
44
}