Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public function execute(ContextInterface $context, CartInterface $cart, array $s
}
$shippingMethodInput = current($shippingMethodsInput);

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

if (!isset($shippingMethodInput['method_code']) || empty($shippingMethodInput['method_code'])) {
if (empty($shippingMethodInput['method_code'])) {
throw new GraphQlInputException(__('Required parameter "method_code" is missing.'));
}
$methodCode = $shippingMethodInput['method_code'];
Expand Down