Skip to content

Commit 63fe5bb

Browse files
committed
Removed array_filter
1 parent 8df165a commit 63fe5bb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Model/DataLayer/Cart/Item.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function get(QuoteItem $quoteItem): array
2121
{
2222
$product = $quoteItem->getProduct();
2323
$categoryNames = $this->getCategoryNames($product);
24-
return array_merge(array_filter([
24+
return array_merge([
2525
'item_id' => ($this->config->getProductAttribute() == 'sku')
2626
? $quoteItem->getSku()
2727
: $this->getProductAttributeValue($product, $this->config->getProductAttribute()),
@@ -31,7 +31,7 @@ public function get(QuoteItem $quoteItem): array
3131
'item_brand' => $this->getProductAttributeValue($product, $this->config->getBrandAttribute()),
3232
'price' => $this->getValue($quoteItem),
3333
'quantity' => $quoteItem->getQty() * 1
34-
]), $categoryNames);
34+
], $categoryNames);
3535
}
3636

3737
/**

Model/DataLayer/Order/Item.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function get(OrderItemInterface $orderItem): array
2121
{
2222
$product = $orderItem->getProduct();
2323
$categoryNames = $this->getCategoryNames($product);
24-
return array_merge(array_filter([
24+
return array_merge([
2525
'item_id' => ($this->config->getProductAttribute() == 'sku')
2626
? $orderItem->getSku()
2727
: $this->getProductAttributeValue($product, $this->config->getProductAttribute()),
@@ -30,7 +30,7 @@ public function get(OrderItemInterface $orderItem): array
3030
'item_brand' => $this->getProductAttributeValue($product, $this->config->getBrandAttribute()),
3131
'price' => $this->getValue($orderItem),
3232
'quantity' => $orderItem->getQtyOrdered() * 1
33-
]), $categoryNames);
33+
], $categoryNames);
3434
}
3535

3636
/**

Model/DataLayer/Product/Item.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ class Item extends AbstractDataLayer implements ItemInterface
2020
public function get(Product $product): array
2121
{
2222
$categoryNames = $this->getCategoryNames($product);
23-
return array_merge(array_filter([
23+
return array_merge([
2424
'item_id' => $this->getProductAttributeValue($product, $this->config->getProductAttribute()),
2525
'item_name' => $product->getName(),
2626
'item_brand' => $this->getProductAttributeValue($product, $this->config->getBrandAttribute()),
2727
'price' => $this->getProductValue($product)
28-
]), $categoryNames);
28+
], $categoryNames);
2929
}
3030
}

0 commit comments

Comments
 (0)