sort output
parent
2a07084f9e
commit
6328e90823
|
@ -314,6 +314,17 @@ function output(): void
|
||||||
$filteredData[$hash] = $entry;
|
$filteredData[$hash] = $entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usort($filteredData, function ($a, $b) {
|
||||||
|
$r = strcmp($a["name"], $b["name"]);
|
||||||
|
if ($r !== 0) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
return strcmp(
|
||||||
|
strval(json_encode($a["labels"])),
|
||||||
|
strval(json_encode($b["labels"]))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
foreach ($filteredData as $entry) {
|
foreach ($filteredData as $entry) {
|
||||||
$labels = [];
|
$labels = [];
|
||||||
if (isset($entry["labels"])) {
|
if (isset($entry["labels"])) {
|
||||||
|
@ -423,6 +434,7 @@ function getEnvWithDefaultInt(string $key, int $default): int
|
||||||
{
|
{
|
||||||
return intval(getEnvWithDefault($key, $default));
|
return intval(getEnvWithDefault($key, $default));
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEnvWithDefault(
|
function getEnvWithDefault(
|
||||||
string $key,
|
string $key,
|
||||||
bool|string|int $default
|
bool|string|int $default
|
||||||
|
|
Loading…
Reference in New Issue