Skip to content

Commit 9c08e87

Browse files
committed
Refactoring
1 parent 1852bab commit 9c08e87

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Model/Import/Category.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,10 @@ public function getAttributeOptions(AbstractAttribute $attribute): array
337337
if ($attribute->usesSource()) {
338338
// should attribute has index (option value) instead of a label?
339339
$index = 'label';
340-
if (
341-
in_array($attribute->getAttributeCode(), $this->indexValueAttributes) ||
342-
$attribute->getSourceModel() == Boolean::class
343-
) {
340+
if (in_array($attribute->getAttributeCode(), $this->indexValueAttributes, true)
341+
|| $attribute->getSourceModel() === Boolean::class) {
344342
$index = 'value';
345-
};
343+
}
346344

347345
// only default (admin) store values used
348346
/** @var Attribute $attribute */

0 commit comments

Comments
 (0)