Skip to content

Commit 3ee0373

Browse files
committed
MC-20636: Order Details : Order Details by Order Number
- fix static
1 parent 3b3730e commit 3ee0373

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

app/code/Magento/SalesGraphQl/Model/Resolver/InvoiceItems.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ public function resolve(
5555
array $value = null,
5656
array $args = null
5757
) {
58-
if (!($value['model'] ?? null) instanceof InvoiceInterface) {
58+
if (!(($value['model'] ?? null) instanceof InvoiceInterface)) {
5959
throw new LocalizedException(__('"model" value should be specified'));
6060
}
6161

62-
if (!($value['order'] ?? null) instanceof OrderInterface) {
62+
if (!(($value['order'] ?? null) instanceof OrderInterface)) {
6363
throw new LocalizedException(__('"order" value should be specified'));
6464
}
6565

app/code/Magento/SalesGraphQl/Model/Resolver/Invoices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function resolve(
2929
array $value = null,
3030
array $args = null
3131
) {
32-
if (!($value['model'] ?? null) instanceof OrderInterface) {
32+
if (!(($value['model'] ?? null) instanceof OrderInterface)) {
3333
throw new LocalizedException(__('"model" value should be specified'));
3434
}
3535

app/code/Magento/SalesGraphQl/Model/Resolver/OrderItems.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
5353
if (false === $context->getExtensionAttributes()->getIsCustomer()) {
5454
throw new GraphQlAuthorizationException(__('The current customer isn\'t authorized.'));
5555
}
56-
if (!($value['model'] ?? null) instanceof OrderInterface) {
56+
if (!(($value['model'] ?? null) instanceof OrderInterface)) {
5757
throw new LocalizedException(__('"model" value should be specified'));
5858
}
5959
/** @var OrderInterface $parentOrder */

app/code/Magento/SalesGraphQl/Model/Resolver/OrderTotal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function resolve(
2525
array $value = null,
2626
array $args = null
2727
) {
28-
if (!($value['model'] ?? null) instanceof OrderInterface) {
28+
if (!(($value['model'] ?? null) instanceof OrderInterface)) {
2929
throw new LocalizedException(__('"model" value should be specified'));
3030
}
3131

dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/RetrieveOrdersByOrderNumberTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function testGetCustomerOrdersSimpleProductQuery()
112112
/** @var \Magento\Sales\Api\Data\OrderInterface[] $items */
113113
$orders = $this->orderRepository->getList($searchCriteria)->getItems();
114114
foreach ($orders as $order) {
115-
$orderId = $order->getEntityId();
115+
$orderId = base64_encode($order->getEntityId());
116116
$orderNumber = $order->getIncrementId();
117117
$this->assertEquals($orderId, $customerOrderItemsInResponse['id']);
118118
$this->assertEquals($orderNumber, $customerOrderItemsInResponse['number']);
@@ -819,8 +819,7 @@ public function testGetCustomerOrdersTwoStoreViewQuery(string $orderNumber, stri
819819
[],
820820
'',
821821
array_merge(
822-
$this->customerAuthenticationHeader->execute(
823-
$currentEmail, $currentPassword),
822+
$this->customerAuthenticationHeader->execute($currentEmail, $currentPassword),
824823
['Store' => $store]
825824
)
826825
);

dev/tests/integration/testsuite/Magento/Sales/_files/orders_with_customer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,3 @@
120120

121121
$orderRepository->save($order);
122122
}
123-

0 commit comments

Comments
 (0)