Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 762cf3b

Browse files
committed
pr-fix
1 parent 3cb78c1 commit 762cf3b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,11 @@ public function iTryToSelectPaymentMethod(string $paymentMethodCode): void
424424
*/
425425
public function iShouldBeNotifiedThatTheOrderShouldBeAddressedFirst()
426426
{
427-
Assert::same($this->ordersClient->getLastResponse()->getStatusCode(), Response::HTTP_UNPROCESSABLE_ENTITY);
427+
$response = $this->ordersClient->getLastResponse();
428+
429+
Assert::same($response->getStatusCode(), Response::HTTP_UNPROCESSABLE_ENTITY);
428430

429-
$content = json_decode($this->ordersClient->getLastResponse()->getContent(), true);
431+
$content = json_decode($response->getContent(), true);
430432

431433
Assert::same($content['message'], 'Order should be addressed first.');
432434
}

src/Sylius/Bundle/ApiBundle/Exception/OrderCannotBeShippedWithoutAddressing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace Sylius\Bundle\ApiBundle\Exception;
1515

16-
class OrderCannotBeShippedWithoutAddressing extends \RuntimeException
16+
final class OrderCannotBeShippedWithoutAddressing extends \RuntimeException
1717
{
1818
public function __construct()
1919
{

0 commit comments

Comments
 (0)