Skip to content

Commit e177e4c

Browse files
authored
ENGCOM-7216: magento/magento2#: GraphQl. Remove a redundant logic in “SetShippingMethodsOnCart” mutation resolver #27349
2 parents 509b15f + c81648d commit e177e4c

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)