Skip to content

Commit

Permalink
[SL-219] fix ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijusCoding committed Oct 2, 2024
1 parent f5ab091 commit 56a734b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Repository/SaferPayCardAliasRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getSavedValidCardsByUserIdAndPaymentMethod($userId, $paymentMeth
$query->where('payment_method = "' . pSQL($paymentMethod) . '"');
$query->where('valid_till > "' . pSQL($currentDate) . '"');

return (array) Db::getInstance()->executeS($query) ?? [];
return Db::getInstance()->executeS($query) ? Db::getInstance()->executeS($query) : [];
}

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ public function getSavedCardsByCustomerId($customerId)
$query->from('saferpay_card_alias');
$query->where('id_customer = "' . (int) $customerId . '"');

return Db::getInstance()->executeS($query) ?? [];
return Db::getInstance()->executeS($query) ? Db::getInstance()->executeS($query) : [];
}

/**
Expand All @@ -106,6 +106,6 @@ public function getSavedCardsNumbersByCustomerId($customerId)
$query->from('saferpay_card_alias');
$query->where('id_customer = "' . (int) $customerId . '"');

return Db::getInstance()->executeS($query) ?? [];
return Db::getInstance()->executeS($query) ? Db::getInstance()->executeS($query) : [];
}
}

0 comments on commit 56a734b

Please sign in to comment.