Skip to content

Commit 6d7b457

Browse files
11209-wishlist-add-grouped-product-error
1 parent ec8a756 commit 6d7b457

File tree

1 file changed

+6
-4
lines changed
  • app/code/Magento/GroupedProduct/Model/Wishlist/Product

1 file changed

+6
-4
lines changed

app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\GroupedProduct\Model\Wishlist\Product;
79

810
use Magento\Wishlist\Model\Item as WishlistItem;
@@ -25,7 +27,7 @@ class Item
2527
public function beforeRepresentProduct(
2628
WishlistItem $subject,
2729
Product $product
28-
) {
30+
): array {
2931
if ($product->getTypeId() === TypeGrouped::TYPE_CODE
3032
&& $product->getId() === $subject->getProduct()->getId()
3133
) {
@@ -72,9 +74,9 @@ public function beforeRepresentProduct(
7274
*/
7375
public function beforeCompareOptions(
7476
WishlistItem $subject,
75-
$options1,
76-
$options2
77-
) {
77+
array $options1,
78+
array $options2
79+
): array {
7880
$diff = array_diff_key($options1, $options2);
7981

8082
if (!$diff) {

0 commit comments

Comments
 (0)