From 03949568f3deb0ec97b0736a559c19dfbd63cf87 Mon Sep 17 00:00:00 2001 From: Vitaliy Boyko Date: Thu, 25 Jul 2019 21:58:35 +0300 Subject: [PATCH] graphQl-784: optimized the code --- .../Magento/QuoteGraphQl/Model/Cart/QuoteAddressFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/QuoteAddressFactory.php b/app/code/Magento/QuoteGraphQl/Model/Cart/QuoteAddressFactory.php index 3ab93e2f0a19d..28017a1f7aca0 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/QuoteAddressFactory.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/QuoteAddressFactory.php @@ -60,10 +60,11 @@ public function __construct( */ public function createBasedOnInputData(array $addressInput): QuoteAddress { + $addressInput['country_id'] = ''; if ($addressInput['country_code']) { $addressInput['country_code'] = strtoupper($addressInput['country_code']); } - $addressInput['country_id'] = $addressInput['country_code'] ?? ''; + $addressInput['country_id'] = $addressInput['country_code']; $maxAllowedLineCount = $this->addressHelper->getStreetLines(); if (is_array($addressInput['street']) && count($addressInput['street']) > $maxAllowedLineCount) {