Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

use Magento\Framework\Exception\InputException;

/**
* Option management model for product attribute.
*/
class OptionManagement implements \Magento\Catalog\Api\ProductAttributeOptionManagementInterface
{
/**
Expand All @@ -25,7 +28,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getItems($attributeCode)
{
Expand All @@ -36,7 +39,7 @@ public function getItems($attributeCode)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function add($attributeCode, $option)
{
Expand All @@ -47,7 +50,7 @@ public function add($attributeCode, $option)
/** @var \Magento\Eav\Api\Data\AttributeOptionInterface $attributeOption */
$attributeOption = $attributeOption->getLabel();
});
if (in_array($option->getLabel(), $currentOptions)) {
if (in_array($option->getLabel(), $currentOptions, true)) {
return false;
}
}
Expand All @@ -59,7 +62,7 @@ public function add($attributeCode, $option)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function delete($attributeCode, $optionId)
{
Expand Down