tools/generate-block-palette-spec: fixed sorting

This commit is contained in:
Dylan K. Taylor 2024-01-09 16:43:11 +00:00
parent c6a09e5ed8
commit c7c20d4d79
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -40,6 +40,7 @@ use function get_class;
use function json_encode;
use function ksort;
use const JSON_PRETTY_PRINT;
use const SORT_NATURAL;
use const SORT_STRING;
use const STDERR;
@ -82,7 +83,7 @@ foreach($states as $state){
foreach(Utils::stringifyKeys($reportMap) as $blockName => $propertyList){
foreach(Utils::stringifyKeys($propertyList) as $propertyName => $propertyValues){
ksort($reportMap[$blockName][$propertyName]);
ksort($propertyValues, SORT_NATURAL);
$reportMap[$blockName][$propertyName] = array_values($propertyValues);
}
}