Skip to content

Commit 4238f7b

Browse files
author
Matthew O'Loughlin
committed
Also switch to null-coalescing for cleanliness
1 parent 9e789ca commit 4238f7b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/code/Magento/BundleGraphQl/Model/Resolver/Options/Collection.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ public function addParentFilterData(int $parentId, int $parentEntityId, string $
7878
public function getOptionsByParentId(int $parentId) : array
7979
{
8080
$options = $this->fetch();
81-
if (!isset($options[$parentId])) {
82-
return [];
83-
}
84-
85-
return $options[$parentId];
81+
return $options[$parentId] ?? [];
8682
}
8783

8884
/**

0 commit comments

Comments
 (0)