Skip to content

Commit 0394956

Browse files
author
Vitaliy Boyko
committed
graphQl-784: optimized the code
1 parent 9078004 commit 0394956

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ public function __construct(
6060
*/
6161
public function createBasedOnInputData(array $addressInput): QuoteAddress
6262
{
63+
$addressInput['country_id'] = '';
6364
if ($addressInput['country_code']) {
6465
$addressInput['country_code'] = strtoupper($addressInput['country_code']);
6566
}
66-
$addressInput['country_id'] = $addressInput['country_code'] ?? '';
67+
$addressInput['country_id'] = $addressInput['country_code'];
6768

6869
$maxAllowedLineCount = $this->addressHelper->getStreetLines();
6970
if (is_array($addressInput['street']) && count($addressInput['street']) > $maxAllowedLineCount) {

0 commit comments

Comments
 (0)