Skip to content

Commit c81648d

Browse files
ENGCOM-7216: magento/magento2#: GraphQl. Remove a redundant logic in “SetShippingMethodsOnCart” mutation resolver #27349
- Merge Pull Request #27349 from atwixfirster/magento2:graphql-SetShippingMethodsOnCart-remove-redundant-logic - Merged commits: 1. baa17d7 2. e5721c1 3. bc5cd19 4. 6ad7552 5. 58e7441 6. 1f5efdf
2 parents 679cd33 + 1f5efdf commit c81648d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public function execute(ContextInterface $context, CartInterface $cart, array $s
4242
}
4343
$shippingMethodInput = current($shippingMethodsInput);
4444

45-
if (!isset($shippingMethodInput['carrier_code']) || empty($shippingMethodInput['carrier_code'])) {
45+
if (empty($shippingMethodInput['carrier_code'])) {
4646
throw new GraphQlInputException(__('Required parameter "carrier_code" is missing.'));
4747
}
4848
$carrierCode = $shippingMethodInput['carrier_code'];
4949

50-
if (!isset($shippingMethodInput['method_code']) || empty($shippingMethodInput['method_code'])) {
50+
if (empty($shippingMethodInput['method_code'])) {
5151
throw new GraphQlInputException(__('Required parameter "method_code" is missing.'));
5252
}
5353
$methodCode = $shippingMethodInput['method_code'];

0 commit comments

Comments
 (0)