Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sprankhub committed Oct 24, 2022
1 parent 1852bab commit 9c08e87
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Model/Import/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,10 @@ public function getAttributeOptions(AbstractAttribute $attribute): array
if ($attribute->usesSource()) {
// should attribute has index (option value) instead of a label?
$index = 'label';
if (
in_array($attribute->getAttributeCode(), $this->indexValueAttributes) ||
$attribute->getSourceModel() == Boolean::class
) {
if (in_array($attribute->getAttributeCode(), $this->indexValueAttributes, true)
|| $attribute->getSourceModel() === Boolean::class) {
$index = 'value';
};
}

// only default (admin) store values used
/** @var Attribute $attribute */
Expand Down

0 comments on commit 9c08e87

Please sign in to comment.