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

@@ 95-101 (lines=7) @@
92
    }
93
94
    // Sort the plugins so that the ones with higher weight come first.
95
    usort($items, function (array $a, array $b) {
96
      if ($a['weight'] === $b['weight']) {
97
        return 0;
98
      }
99
100
      return ($a['weight'] < $b['weight']) ? 1 : -1;
101
    });
102
103
    return array_map(function (array $item) {
104
      return $this->getInstance($item['type'], $item['id']);