Code Duplication    Length = 3-3 lines in 2 locations

src/Plugin/Deriver/PluggableSchemaDeriver.php 2 locations

@@ 208-210 (lines=3) @@
205
      if ($type['type'] === 'interface') {
206
        return [$type['definition']['name'] => array_values(array_map(function ($type) {
207
          return $type['definition']['name'];
208
        }, array_filter($types, function ($subType) use ($type) {
209
          return $subType['type'] === 'type' && in_array($type['definition']['name'], $subType['definition']['interfaces']);
210
        })))];
211
      }
212
213
      // Union types combine the two approaches above.
@@ 219-221 (lines=3) @@
216
217
        $implicit = array_values(array_map(function ($type) {
218
          return $type['definition']['name'];
219
        }, array_filter($types, function ($subType) use ($type) {
220
          return $subType['type'] === 'type' && in_array($type['definition']['name'], $subType['definition']['unions']);
221
        })));
222
223
        return [$type['definition']['name'] => array_merge($explicit, $implicit)];
224
      }