Skip to content

Commit 2e2a2a8

Browse files
ashishkumarpundeerashishkumarpundeer
authored andcommitted
AC1096 ShippingCartAddress needs a uid updated
1 parent cdd34d2 commit 2e2a2a8

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use Magento\Framework\Api\ExtensibleDataObjectConverter;
1111
use Magento\Quote\Api\Data\AddressInterface;
12-
use Magento\Framework\GraphQl\Query\Uid;
1312
use Magento\Quote\Model\Quote\Address as QuoteAddress;
13+
use Magento\Framework\GraphQl\Query\Uid;
1414

1515
/**
1616
* Extract address fields from an Quote Address model
@@ -32,6 +32,7 @@ class ExtractQuoteAddressData
3232
/**
3333
* @param ExtensibleDataObjectConverter $dataObjectConverter
3434
* @param Uid $uidEncoder
35+
* @type object
3536
*/
3637
public function __construct(
3738
ExtensibleDataObjectConverter $dataObjectConverter,
@@ -64,7 +65,7 @@ public function execute(QuoteAddress $address): array
6465
'label' => $address->getRegion(),
6566
'region_id'=> $address->getRegionId()
6667
],
67-
'uid'=>$this->uidEncoder->encode((string) $address->getAddressId()) ,
68+
'uid' => $this->uidEncoder->encode((string)$address->getAddressId()) ,
6869
'street' => $address->getStreet(),
6970
'items_weight' => $address->getWeight(),
7071
'customer_notes' => $address->getCustomerNotes()

app/code/Magento/QuoteGraphQl/Model/CartItem/CartItemUidArgsProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CartItemUidArgsProcessor implements ArgumentsProcessorInterface
2121
private const UID = 'cart_item_uid';
2222

2323
/** @var Uid */
24-
private $uidEncoder;
24+
private Uid $uidEncoder;
2525

2626
/**
2727
* @param Uid $uidEncoder

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetSpecifiedShippingAddressTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ public function testGetSpecifiedShippingAddress()
5252
$response = $this->graphQlQuery($query, [], '', $this->getHeaderMap());
5353
self::assertArrayHasKey('cart', $response);
5454
self::assertArrayHasKey('shipping_addresses', $response['cart']);
55-
$uid=$response['cart']['shipping_addresses'][0]['uid'];
55+
$uid = $response['cart']['shipping_addresses'][0]['uid'];
5656
$expectedShippingAddressData = [
57-
'uid' =>$uid,
57+
'uid' => $uid,
5858
'firstname' => 'John',
5959
'lastname' => 'Smith',
6060
'company' => 'CompanyName',

0 commit comments

Comments
 (0)