Skip to content

Commit

Permalink
GraphQl-903: fixed static issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Boyko committed Oct 2, 2019
1 parent 3ec2842 commit 9d96481
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,10 @@ public function execute(ContextInterface $context, CartInterface $cart, array $b
{
$customerAddressId = $billingAddressInput['customer_address_id'] ?? null;
$addressInput = $billingAddressInput['address'] ?? null;
$useForShipping = isset($billingAddressInput['use_for_shipping'])
? (bool)$billingAddressInput['use_for_shipping'] : false;
$sameAsShipping = isset($billingAddressInput['same_as_shipping'])
? (bool)$billingAddressInput['same_as_shipping'] : false;

if (!isset($billingAddressInput['same_as_shipping'])) {
$sameAsShipping = isset($billingAddressInput['use_for_shipping'])
? (bool)$billingAddressInput['use_for_shipping'] : false;
}
? (bool)$billingAddressInput['same_as_shipping'] : $useForShipping;

if (null === $customerAddressId && null === $addressInput) {
throw new GraphQlInputException(
Expand Down

0 comments on commit 9d96481

Please sign in to comment.