Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
Fix static test and remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
pmclain committed Aug 24, 2019
1 parent f0bb8d5 commit b2a21ed
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace Magento\QuoteGraphQl\Model\Cart;

use Magento\Customer\Model\Address\AbstractAddress;
use Magento\Framework\Api\ExtensibleDataObjectConverter;
use Magento\Quote\Api\Data\AddressInterface;
use Magento\Quote\Model\Quote\Address as QuoteAddress;
Expand Down Expand Up @@ -41,19 +40,22 @@ public function execute(QuoteAddress $address): array
$addressData = $this->dataObjectConverter->toFlatArray($address, [], AddressInterface::class);
$addressData['model'] = $address;

$addressData = array_merge($addressData, [
'country' => [
'code' => $address->getCountryId(),
'label' => $address->getCountry()
],
'region' => [
'code' => $address->getRegionCode(),
'label' => $address->getRegion()
],
'street' => $address->getStreet(),
'items_weight' => $address->getWeight(),
'customer_notes' => $address->getCustomerNotes()
]);
$addressData = array_merge(
$addressData,
[
'country' => [
'code' => $address->getCountryId(),
'label' => $address->getCountry()
],
'region' => [
'code' => $address->getRegionCode(),
'label' => $address->getRegion()
],
'street' => $address->getStreet(),
'items_weight' => $address->getWeight(),
'customer_notes' => $address->getCustomerNotes()
]
);

if (!$address->hasItems()) {
return $addressData;
Expand Down

0 comments on commit b2a21ed

Please sign in to comment.