@@ -47,6 +47,7 @@ public function __construct(
4747 * @param CartInterface $customerCart
4848 * @param CartInterface $guestCart
4949 * @return bool
50+ * @throws NoSuchEntityException
5051 */
5152 public function validateFinalCartQuantities (CartInterface $ customerCart , CartInterface $ guestCart ): bool
5253 {
@@ -68,7 +69,7 @@ public function validateFinalCartQuantities(CartInterface $customerCart, CartInt
6869 $ sku = $ this ->getSkuFromItem ($ customerCartItem );
6970 $ product = $ this ->getProduct ((int ) $ customerCartItem ->getProduct ()->getId ());
7071 $ isAvailable = $ customerCartItem ->getChildren ()
71- ? $ this ->validateCompositeProductQty ($ product , $ guestCartItem , $ customerCartItem )
72+ ? $ this ->validateCompositeProductQty ($ guestCartItem , $ customerCartItem )
7273 : $ this ->validateProductQty ($ product , $ sku , $ guestCartItem ->getQty (), $ customerCartItem ->getQty ());
7374
7475 if ($ this ->config ->getCartMergePreference () === Config::CART_PREFERENCE_GUEST ) {
@@ -91,6 +92,7 @@ public function validateFinalCartQuantities(CartInterface $customerCart, CartInt
9192 *
9293 * @param CartItemInterface $item
9394 * @return string
95+ * @throws NoSuchEntityException
9496 */
9597 private function getSkuFromItem (CartItemInterface $ item ): string
9698 {
@@ -144,13 +146,12 @@ private function validateProductQty(
144146 /**
145147 * Validate composite product quantities
146148 *
147- * @param ProductInterface $productInterface
148149 * @param Item $guestCartItem
149150 * @param Item $customerCartItem
150151 * @return bool
152+ * @throws NoSuchEntityException
151153 */
152154 private function validateCompositeProductQty (
153- ProductInterface $ productInterface ,
154155 Item $ guestCartItem ,
155156 Item $ customerCartItem
156157 ): bool {
0 commit comments