Skip to content

Commit

Permalink
Fix attribute options importer sorter (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Apr 4, 2022
1 parent c28c1e3 commit fd8a5af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AttributeOptions/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fd8a5af

Please sign in to comment.