Code Duplication    Length = 10-10 lines in 2 locations

src/Plugin/GraphQL/InputTypes/InputTypePluginBase.php 1 location

@@ 87-96 (lines=10) @@
84
   * @return \Youshido\GraphQL\Type\TypeInterface
85
   *   The type object.
86
   */
87
  protected function buildFieldType(PluggableSchemaBuilderInterface $schemaBuilder, $field) {
88
    $type = is_array($field) ? $field['type'] : $field;
89
    return $this->parseType($type, function ($type) use ($schemaBuilder) {
90
      return $schemaBuilder->findByDataTypeOrName($type, [
91
        GRAPHQL_INPUT_TYPE_PLUGIN,
92
        GRAPHQL_SCALAR_PLUGIN,
93
        GRAPHQL_ENUM_PLUGIN,
94
      ])->getDefinition($schemaBuilder);
95
    });
96
  }
97
}
98

src/Plugin/GraphQL/Traits/ArgumentAwarePluginTrait.php 1 location

@@ 59-68 (lines=10) @@
56
   * @return \Youshido\GraphQL\Type\TypeInterface
57
   *   The type object.
58
   */
59
  protected function buildArgumentType(PluggableSchemaBuilderInterface $schemaBuilder, $argument) {
60
    $type = is_array($argument) ? $argument['type'] : $argument;
61
    return $this->parseType($type, function ($type) use ($schemaBuilder) {
62
      return $schemaBuilder->findByDataTypeOrName($type, [
63
        GRAPHQL_INPUT_TYPE_PLUGIN,
64
        GRAPHQL_SCALAR_PLUGIN,
65
        GRAPHQL_ENUM_PLUGIN,
66
      ])->getDefinition($schemaBuilder);
67
    });
68
  }
69
70
}
71