Simplify code by using intval() instead of if

[MAILPOET-4357]
This commit is contained in:
Rodrigo Primo
2022-08-05 11:26:13 -03:00
committed by Veljko V
parent 6127336eab
commit 2ecf5fc2fa

View File

@ -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 {