Skip to content

Commit 4970798

Browse files
committed
LYNX-100: Refactoring; fix static tests
1 parent 9077f31 commit 4970798

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/code/Magento/EavGraphQl/Model/Output/GetAttributeData.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ private function getOptions(AttributeInterface $attribute): array
9797
return array_filter(
9898
array_map(
9999
function (AttributeOptionInterface $option) use ($attribute) {
100-
$value = is_array($option->getValue()) ? (empty($option->getValue()) ? '' : (string)$option->getValue()[0]['value']) : (string)$option->getValue();
100+
if (is_array($option->getValue())) {
101+
$value = (empty($option->getValue()) ? '' : (string)$option->getValue()[0]['value']);
102+
} else {
103+
$value = (string)$option->getValue();
104+
}
101105
$label = (string)$option->getLabel();
102106
if (empty(trim($value)) && empty(trim($label))) {
103107
return null;

app/code/Magento/EavGraphQl/Model/Resolver/AttributesList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function resolve(
108108
* @param array $attributesList
109109
* @param string $entityType
110110
* @param int $storeId
111-
*
111+
*
112112
* @return array
113113
*/
114114
private function getAtrributesMetadata(array $attributesList, string $entityType, int $storeId)

0 commit comments

Comments
 (0)