Skip to content

Commit

Permalink
return on null
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 10, 2021
1 parent 6a7e8e7 commit 27bcf13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Queue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ public function getJobBackoff($job)
return;
}

return collect(Arr::wrap($job->backoff ?? $job->backoff()))
if (is_null($backoff = $job->backoff ?? $job->backoff())) {
return;
}

return collect(Arr::wrap($backoff))
->map(function ($backoff) {
return $backoff instanceof DateTimeInterface
? $this->secondsUntil($backoff) : $backoff;
Expand Down

0 comments on commit 27bcf13

Please sign in to comment.