From ce3b9b2b7b34d706b9ca03f060b3a59c631921a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Fri, 9 Dec 2022 11:37:09 +0100 Subject: [PATCH] Remove redundant variables [MAILPOET-3995] --- mailpoet/lib/Cron/Triggers/WordPress.php | 25 ++++++++---------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/mailpoet/lib/Cron/Triggers/WordPress.php b/mailpoet/lib/Cron/Triggers/WordPress.php index 7f71fb69e3..5755ade8b5 100644 --- a/mailpoet/lib/Cron/Triggers/WordPress.php +++ b/mailpoet/lib/Cron/Triggers/WordPress.php @@ -1,4 +1,4 @@ -loadTasksCounts(); - // check requirements for each worker - $sendingQueueActive = $this->isSendingQueueActive(); - $bounceSyncActive = $this->isBounceActive(); - $sendingServiceKeyCheckActive = $this->isSendingServiceKeyCheckActive(); - $premiumKeyCheckActive = $this->isPremiumKeyCheckActive(); - $subscribersStatsReportActive = $this->isSubscriberStatsReportActive(); - $migrationActive = $this->isMigrationActive(); - $beamerActive = $this->isBeamerCheckActive(); - // Because a lot of workers has the same pattern for check if it's active we can use a loop here $isSimpleWorkerActive = false; foreach (WorkersFactory::SIMPLE_WORKER_TYPES as $simpleWorkerType) { @@ -129,13 +120,13 @@ class WordPress { } return ( - $migrationActive - || $sendingQueueActive - || $bounceSyncActive - || $sendingServiceKeyCheckActive - || $premiumKeyCheckActive - || $subscribersStatsReportActive - || $beamerActive + $this->isMigrationActive() + || $this->isSendingQueueActive() + || $this->isBounceActive() + || $this->isSendingServiceKeyCheckActive() + || $this->isPremiumKeyCheckActive() + || $this->isSubscriberStatsReportActive() + || $this->isBeamerCheckActive() || $isSimpleWorkerActive ); }