Skip to content

Commit 9d96481

Browse files
author
Vitaliy Boyko
committed
GraphQl-903: fixed static issue
1 parent 3ec2842 commit 9d96481

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@ public function execute(ContextInterface $context, CartInterface $cart, array $b
5656
{
5757
$customerAddressId = $billingAddressInput['customer_address_id'] ?? null;
5858
$addressInput = $billingAddressInput['address'] ?? null;
59+
$useForShipping = isset($billingAddressInput['use_for_shipping'])
60+
? (bool)$billingAddressInput['use_for_shipping'] : false;
5961
$sameAsShipping = isset($billingAddressInput['same_as_shipping'])
60-
? (bool)$billingAddressInput['same_as_shipping'] : false;
61-
62-
if (!isset($billingAddressInput['same_as_shipping'])) {
63-
$sameAsShipping = isset($billingAddressInput['use_for_shipping'])
64-
? (bool)$billingAddressInput['use_for_shipping'] : false;
65-
}
62+
? (bool)$billingAddressInput['same_as_shipping'] : $useForShipping;
6663

6764
if (null === $customerAddressId && null === $addressInput) {
6865
throw new GraphQlInputException(

0 commit comments

Comments
 (0)