|
3 | 3 | * Copyright 2025 Adobe |
4 | 4 | * All Rights Reserved. |
5 | 5 | */ |
| 6 | + |
| 7 | +declare(strict_types=1); |
| 8 | + |
6 | 9 | namespace Magento\Quote\Api; |
7 | 10 |
|
8 | 11 | use Magento\Catalog\Api\ProductRepositoryInterface; |
@@ -144,10 +147,8 @@ private function addConfigurableProductToCart(string $guestCartId, string $admin |
144 | 147 |
|
145 | 148 | private function verifyCartItems(string $guestCartId, string $adminToken, int $expectedItemId) |
146 | 149 | { |
147 | | - $serviceInfo = $this->getCartServiceInfo($guestCartId, $adminToken,'get'); |
148 | | - |
| 150 | + $serviceInfo = $this->getCartServiceInfo($guestCartId, $adminToken, 'get'); |
149 | 151 | $response = $this->_webApiCall($serviceInfo, []); |
150 | | - |
151 | 152 | $this->assertIsArray($response); |
152 | 153 | $this->assertGreaterThan(0, count($response), 'Cart should contain at least one item'); |
153 | 154 |
|
@@ -236,8 +237,12 @@ private function buildCartItemRequestData(string $cartId, string $sku, int $attr |
236 | 237 | ]; |
237 | 238 | } |
238 | 239 |
|
239 | | - private function getCartServiceInfo(string $cartId, string $adminToken, string $action = 'add', int $itemId = null): array |
240 | | - { |
| 240 | + private function getCartServiceInfo( |
| 241 | + string $cartId, |
| 242 | + string $adminToken, |
| 243 | + string $action = 'add', |
| 244 | + ?int $itemId = null |
| 245 | + ): array { |
241 | 246 | $resourcePath = self::RESOURCE_PATH_GUEST_CART . $cartId . '/items'; |
242 | 247 | if ($action === 'update' && $itemId !== null) { |
243 | 248 | $resourcePath .= '/' . $itemId; |
|
0 commit comments