Sort pads by key when converting ATDFs to TDFs

This commit is contained in:
Nav
2024-10-12 00:05:37 +01:00
parent 4eeeaf7fa6
commit 8b5f626e4f

View File

@@ -188,6 +188,11 @@ class AtdfService
$tdf->pads = array_values($padsByKey);
// Sort pads by key
uasort($tdf->pads, function (Pad $padA, Pad $padB): bool {
return $padA->key > $padB->key;
});
$variantElements = $this->getElementsFromXPath(
'variants/variant',
$document