Code Duplication    Length = 3-3 lines in 2 locations

src/Plugin/Deriver/PluggableSchemaDeriver.php 2 locations

@@ 227-229 (lines=3) @@
224
      if ($type['type'] === 'interface') {
225
        return [$type['definition']['name'] => array_values(array_map(function ($type) {
226
          return $type['definition']['name'];
227
        }, array_filter($types, function ($subType) use ($type) {
228
          return $subType['type'] === 'type' && in_array($type['definition']['name'], $subType['definition']['interfaces']);
229
        })))];
230
      }
231
232
      // Union types combine the two approaches above.
@@ 238-240 (lines=3) @@
235
236
        $implicit = array_values(array_map(function ($type) {
237
          return $type['definition']['name'];
238
        }, array_filter($types, function ($subType) use ($type) {
239
          return $subType['type'] === 'type' && in_array($type['definition']['name'], $subType['definition']['unions']);
240
        })));
241
242
        return [$type['definition']['name'] => array_merge($explicit, $implicit)];
243
      }