Code Duplication    Length = 3-3 lines in 2 locations

src/Plugin/SchemaBuilder.php 2 locations

@@ 432-434 (lines=3) @@
429
      if ($type['type'] === 'interface') {
430
        return [$type['definition']['name'] => array_values(array_map(function ($type) {
431
          return $type['definition']['name'];
432
        }, array_filter($types, function ($subType) use ($type) {
433
          return $subType['type'] === 'type' && in_array($type['definition']['name'], $subType['definition']['interfaces']);
434
        })))];
435
      }
436
437
      // Union types combine the two approaches above.
@@ 443-445 (lines=3) @@
440
441
        $implicit = array_values(array_map(function ($type) {
442
          return $type['definition']['name'];
443
        }, array_filter($types, function ($subType) use ($type) {
444
          return $subType['type'] === 'type' && in_array($type['definition']['name'], $subType['definition']['unions']);
445
        })));
446
447
        return [$type['definition']['name'] => array_merge($explicit, $implicit)];
448
      }