From 2ecf5fc2fa5615a5e7f328893e6b2c82efa19c4d Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Fri, 5 Aug 2022 11:26:13 -0300 Subject: [PATCH] Simplify code by using intval() instead of if [MAILPOET-4357] --- .../Sending/ScheduledTaskSubscribersRepository.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mailpoet/lib/Newsletter/Sending/ScheduledTaskSubscribersRepository.php b/mailpoet/lib/Newsletter/Sending/ScheduledTaskSubscribersRepository.php index 4e65c4f11b..a2ff9e0995 100644 --- a/mailpoet/lib/Newsletter/Sending/ScheduledTaskSubscribersRepository.php +++ b/mailpoet/lib/Newsletter/Sending/ScheduledTaskSubscribersRepository.php @@ -62,11 +62,7 @@ class ScheduledTaskSubscribersRepository extends Repository { ->getQuery() ->getSingleScalarResult(); - if (is_numeric($countSubscribers)) { - return (int)$countSubscribers; - } else { - return 0; - } + return intval($countSubscribers); } public function getSubscriberIdsBatchForTask(int $taskId, int $lastProcessedSubscriberId, int $limit): array {