Skip to content

Commit

Permalink
11209-wishlist-add-grouped-product-error
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxRomanov4669 committed Jan 10, 2020
1 parent ec8a756 commit 6d7b457
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\GroupedProduct\Model\Wishlist\Product;

use Magento\Wishlist\Model\Item as WishlistItem;
Expand All @@ -25,7 +27,7 @@ class Item
public function beforeRepresentProduct(
WishlistItem $subject,
Product $product
) {
): array {
if ($product->getTypeId() === TypeGrouped::TYPE_CODE
&& $product->getId() === $subject->getProduct()->getId()
) {
Expand Down Expand Up @@ -72,9 +74,9 @@ public function beforeRepresentProduct(
*/
public function beforeCompareOptions(
WishlistItem $subject,
$options1,
$options2
) {
array $options1,
array $options2
): array {
$diff = array_diff_key($options1, $options2);

if (!$diff) {
Expand Down

0 comments on commit 6d7b457

Please sign in to comment.