Fix phpstan level 6

[MAILPOET-1969]
This commit is contained in:
Pavel Dohnal
2019-04-09 13:46:03 +02:00
committed by M. Shull
parent 46a0b7501b
commit 3e66e9e1dd
36 changed files with 320 additions and 244 deletions

View File

@ -73,7 +73,7 @@ class State
$queue = $newsletter = null;
if ($task->type === Sending::TASK_TYPE) {
$queue = SendingQueue::where('task_id', $task->id)->findOne();
$newsletter = $queue ? $queue->newsletter()->findOne() : null;
$newsletter = $queue instanceof SendingQueue ? $queue->newsletter()->findOne() : null;
}
return [
'id' => (int)$task->id,