Remove phpstan errors from the rest of the code

[MAILPOET-3235]
This commit is contained in:
Jan Lysý
2021-01-12 12:15:35 +01:00
committed by Veljko V
parent 479f2cf198
commit 4390a1932d
9 changed files with 27 additions and 9 deletions

View File

@ -8,6 +8,7 @@ use MailPoet\Cron\Workers\SendingQueue\Tasks\Links;
use MailPoet\Cron\Workers\SendingQueue\Tasks\Mailer as MailerTask;
use MailPoet\Cron\Workers\SendingQueue\Tasks\Newsletter as NewsletterTask;
use MailPoet\Cron\Workers\StatsNotifications\Scheduler as StatsNotificationsScheduler;
use MailPoet\Entities\NewsletterEntity;
use MailPoet\Logging\LoggerFactory;
use MailPoet\Mailer\MailerError;
use MailPoet\Mailer\MailerLog;
@ -167,7 +168,9 @@ class SendingQueue {
['newsletter_id' => $newsletter->id, 'task_id' => $queue->taskId]
);
$this->newsletterTask->markNewsletterAsSent($newsletter, $queue);
$this->statsNotificationsScheduler->schedule($this->newslettersRepository->findOneById($newsletter->id));
$newsletter = $this->newslettersRepository->findOneById($newsletter->id);
assert($newsletter instanceof NewsletterEntity);
$this->statsNotificationsScheduler->schedule($newsletter);
}
$this->enforceSendingAndExecutionLimits($timer);
}