Skip to content

Commit eec67e9

Browse files
authored
ENGCOM-5327: #687 Remove Redundant 'isset' #749
2 parents 423f763 + 41e424b commit eec67e9

19 files changed

+31
-31
lines changed

app/code/Magento/CustomerGraphQl/Model/Resolver/CreateCustomer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function resolve(
5151
array $value = null,
5252
array $args = null
5353
) {
54-
if (!isset($args['input']) || !is_array($args['input']) || empty($args['input'])) {
54+
if (empty($args['input']) || !is_array($args['input'])) {
5555
throw new GraphQlInputException(__('"input" value should be specified'));
5656
}
5757

app/code/Magento/CustomerGraphQl/Model/Resolver/CreateCustomerAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function resolve(
6060
array $value = null,
6161
array $args = null
6262
) {
63-
if (!isset($args['input']) || !is_array($args['input']) || empty($args['input'])) {
63+
if (empty($args['input']) || !is_array($args['input'])) {
6464
throw new GraphQlInputException(__('"input" value should be specified'));
6565
}
6666

app/code/Magento/CustomerGraphQl/Model/Resolver/DeleteCustomerAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function resolve(
6060
array $value = null,
6161
array $args = null
6262
) {
63-
if (!isset($args['id']) || empty($args['id'])) {
63+
if (empty($args['id'])) {
6464
throw new GraphQlInputException(__('Address "id" value should be specified'));
6565
}
6666

app/code/Magento/CustomerGraphQl/Model/Resolver/GenerateCustomerToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ public function resolve(
4444
array $value = null,
4545
array $args = null
4646
) {
47-
if (!isset($args['email']) || empty($args['email'])) {
47+
if (empty($args['email'])) {
4848
throw new GraphQlInputException(__('Specify the "email" value.'));
4949
}
5050

51-
if (!isset($args['password']) || empty($args['password'])) {
51+
if (empty($args['password'])) {
5252
throw new GraphQlInputException(__('Specify the "password" value.'));
5353
}
5454

app/code/Magento/CustomerGraphQl/Model/Resolver/IsEmailAvailable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function resolve(
5252
array $value = null,
5353
array $args = null
5454
) {
55-
if (!isset($args['email']) || empty($args['email'])) {
55+
if (empty($args['email'])) {
5656
throw new GraphQlInputException(__('Email must be specified'));
5757
}
5858

app/code/Magento/CustomerGraphQl/Model/Resolver/UpdateCustomer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function resolve(
6060
array $value = null,
6161
array $args = null
6262
) {
63-
if (!isset($args['input']) || !is_array($args['input']) || empty($args['input'])) {
63+
if (empty($args['input']) || !is_array($args['input'])) {
6464
throw new GraphQlInputException(__('"input" value should be specified'));
6565
}
6666

app/code/Magento/CustomerGraphQl/Model/Resolver/UpdateCustomerAddress.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ public function resolve(
6969
array $value = null,
7070
array $args = null
7171
) {
72-
if (!isset($args['id']) || empty($args['id'])) {
72+
if (empty($args['id'])) {
7373
throw new GraphQlInputException(__('Address "id" value must be specified'));
7474
}
7575

76-
if (!isset($args['input']) || !is_array($args['input']) || empty($args['input'])) {
76+
if (empty($args['input']) || !is_array($args['input'])) {
7777
throw new GraphQlInputException(__('"input" value must be specified'));
7878
}
7979

app/code/Magento/QuoteGraphQl/Model/Resolver/AddSimpleProductsToCart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public function __construct(
4747
*/
4848
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
4949
{
50-
if (!isset($args['input']['cart_id']) || empty($args['input']['cart_id'])) {
50+
if (empty($args['input']['cart_id'])) {
5151
throw new GraphQlInputException(__('Required parameter "cart_id" is missing'));
5252
}
5353
$maskedCartId = $args['input']['cart_id'];
5454

55-
if (!isset($args['input']['cart_items']) || empty($args['input']['cart_items'])
55+
if (empty($args['input']['cart_items'])
5656
|| !is_array($args['input']['cart_items'])
5757
) {
5858
throw new GraphQlInputException(__('Required parameter "cart_items" is missing'));

app/code/Magento/QuoteGraphQl/Model/Resolver/ApplyCouponToCart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ public function __construct(
5050
*/
5151
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
5252
{
53-
if (!isset($args['input']['cart_id']) || empty($args['input']['cart_id'])) {
53+
if (empty($args['input']['cart_id'])) {
5454
throw new GraphQlInputException(__('Required parameter "cart_id" is missing'));
5555
}
5656
$maskedCartId = $args['input']['cart_id'];
5757

58-
if (!isset($args['input']['coupon_code']) || empty($args['input']['coupon_code'])) {
58+
if (empty($args['input']['coupon_code'])) {
5959
throw new GraphQlInputException(__('Required parameter "coupon_code" is missing'));
6060
}
6161
$couponCode = $args['input']['coupon_code'];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
*/
3838
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
3939
{
40-
if (!isset($args['cart_id']) || empty($args['cart_id'])) {
40+
if (empty($args['cart_id'])) {
4141
throw new GraphQlInputException(__('Required parameter "cart_id" is missing'));
4242
}
4343
$maskedCartId = $args['cart_id'];

0 commit comments

Comments
 (0)