Remove redundant variables
[MAILPOET-3995]
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
<?php declare(strict_types = 1);
|
||||||
|
|
||||||
namespace MailPoet\Cron\Triggers;
|
namespace MailPoet\Cron\Triggers;
|
||||||
|
|
||||||
@@ -105,15 +105,6 @@ class WordPress {
|
|||||||
public function checkExecutionRequirements(): bool {
|
public function checkExecutionRequirements(): bool {
|
||||||
$this->loadTasksCounts();
|
$this->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
|
// Because a lot of workers has the same pattern for check if it's active we can use a loop here
|
||||||
$isSimpleWorkerActive = false;
|
$isSimpleWorkerActive = false;
|
||||||
foreach (WorkersFactory::SIMPLE_WORKER_TYPES as $simpleWorkerType) {
|
foreach (WorkersFactory::SIMPLE_WORKER_TYPES as $simpleWorkerType) {
|
||||||
@@ -129,13 +120,13 @@ class WordPress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
$migrationActive
|
$this->isMigrationActive()
|
||||||
|| $sendingQueueActive
|
|| $this->isSendingQueueActive()
|
||||||
|| $bounceSyncActive
|
|| $this->isBounceActive()
|
||||||
|| $sendingServiceKeyCheckActive
|
|| $this->isSendingServiceKeyCheckActive()
|
||||||
|| $premiumKeyCheckActive
|
|| $this->isPremiumKeyCheckActive()
|
||||||
|| $subscribersStatsReportActive
|
|| $this->isSubscriberStatsReportActive()
|
||||||
|| $beamerActive
|
|| $this->isBeamerCheckActive()
|
||||||
|| $isSimpleWorkerActive
|
|| $isSimpleWorkerActive
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user