@@ -47,6 +47,7 @@ public function __construct(
47
47
* @param CartInterface $customerCart
48
48
* @param CartInterface $guestCart
49
49
* @return bool
50
+ * @throws NoSuchEntityException
50
51
*/
51
52
public function validateFinalCartQuantities (CartInterface $ customerCart , CartInterface $ guestCart ): bool
52
53
{
@@ -68,7 +69,7 @@ public function validateFinalCartQuantities(CartInterface $customerCart, CartInt
68
69
$ sku = $ this ->getSkuFromItem ($ customerCartItem );
69
70
$ product = $ this ->getProduct ((int ) $ customerCartItem ->getProduct ()->getId ());
70
71
$ isAvailable = $ customerCartItem ->getChildren ()
71
- ? $ this ->validateCompositeProductQty ($ product , $ guestCartItem , $ customerCartItem )
72
+ ? $ this ->validateCompositeProductQty ($ guestCartItem , $ customerCartItem )
72
73
: $ this ->validateProductQty ($ product , $ sku , $ guestCartItem ->getQty (), $ customerCartItem ->getQty ());
73
74
74
75
if ($ this ->config ->getCartMergePreference () === Config::CART_PREFERENCE_GUEST ) {
@@ -91,6 +92,7 @@ public function validateFinalCartQuantities(CartInterface $customerCart, CartInt
91
92
*
92
93
* @param CartItemInterface $item
93
94
* @return string
95
+ * @throws NoSuchEntityException
94
96
*/
95
97
private function getSkuFromItem (CartItemInterface $ item ): string
96
98
{
@@ -144,13 +146,12 @@ private function validateProductQty(
144
146
/**
145
147
* Validate composite product quantities
146
148
*
147
- * @param ProductInterface $productInterface
148
149
* @param Item $guestCartItem
149
150
* @param Item $customerCartItem
150
151
* @return bool
152
+ * @throws NoSuchEntityException
151
153
*/
152
154
private function validateCompositeProductQty (
153
- ProductInterface $ productInterface ,
154
155
Item $ guestCartItem ,
155
156
Item $ customerCartItem
156
157
): bool {
0 commit comments