Code Duplication    Length = 10-11 lines in 2 locations

src/Plugin/GraphQL/Mutations/MutationPluginBase.php 1 location

@@ 39-48 (lines=10) @@
36
  /**
37
   * {@inheritdoc}
38
   */
39
  public function getDefinition() {
40
    $definition = $this->getPluginDefinition();
41
42
    return [
43
      'type' => $this->buildType($definition),
44
      'description' => $this->buildDescription($definition),
45
      'args' => $this->buildArguments($definition),
46
      'deprecationReason' => $this->buildDeprecationReason($definition),
47
    ];
48
  }
49
}
50

src/Plugin/GraphQL/Fields/FieldPluginBase.php 1 location

@@ 51-61 (lines=11) @@
48
  /**
49
   * {@inheritdoc}
50
   */
51
  public function getDefinition() {
52
    $definition = $this->getPluginDefinition();
53
54
    return [
55
      'type' => $this->buildType($definition),
56
      'description' => $this->buildDescription($definition),
57
      'args' => $this->buildArguments($definition),
58
      'deprecationReason' => $this->buildDeprecationReason($definition),
59
      'contexts' => $this->buildCacheContexts($definition),
60
    ];
61
  }
62
63
  /**
64
   * {@inheritdoc}