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