Code Duplication    Length = 7-7 lines in 2 locations

src/GraphQL/Type/InterfaceType.php 1 location

@@ 59-65 (lines=7) @@
56
      'type' => $type,
57
    ];
58
59
    uasort($this->types, function (array $a, array $b) {
60
      if ($a['weight'] === $b['weight']) {
61
        return 0;
62
      }
63
64
      return ($a['weight'] < $b['weight']) ? 1 : -1;
65
    });
66
  }
67
68
  /**

src/Plugin/GraphQL/PluggableSchemaBuilder.php 1 location

@@ 87-93 (lines=7) @@
84
    }
85
86
    // Sort the plugins so that the ones with higher weight come first.
87
    usort($items, function (array $a, array $b) {
88
      if ($a['weight'] === $b['weight']) {
89
        return 0;
90
      }
91
92
      return ($a['weight'] < $b['weight']) ? 1 : -1;
93
    });
94
95
    return array_map(function (array $item) {
96
      return $this->getInstance($item['type'], $item['id']);