Skip to content

Commit

Permalink
graphQl-784: optimized the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Boyko committed Jul 25, 2019
1 parent 9078004 commit 0394956
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0394956

Please sign in to comment.