From 47487029fa817f023b8277552908dae376fc7917 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Mon, 4 Apr 2022 11:48:03 +0200 Subject: [PATCH] Fix attribute options importer sorter (#126) --- src/AttributeOptions/Importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AttributeOptions/Importer.php b/src/AttributeOptions/Importer.php index 8e82f553..1849ad80 100644 --- a/src/AttributeOptions/Importer.php +++ b/src/AttributeOptions/Importer.php @@ -40,7 +40,7 @@ public function import(string $identifier): void $attributeOptions = $this->apiClient->findAllAttributeOptions($identifier); usort( $attributeOptions, - static fn (array $option1, array $option2): int => ($option2['sort_order'] ?? 0) <=> ($option1['sort_order'] ?? 0) + static fn (array $option1, array $option2): int => ($option1['sort_order'] ?? 0) <=> ($option2['sort_order'] ?? 0) ); $configuration = $attribute->getConfiguration(); $configuration['choices'] = $this->convertAkeneoAttributeOptionsIntoSyliusChoices($attributeOptions);