Skip to content

Commit

Permalink
Use empty() for both array checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Apr 19, 2024
1 parent 0ae2866 commit b95c56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rule/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static function initialAcceptedEvents() : array {
public function nextAcceptedEvents() : array
{
$nextEvents = parent::nextAcceptedEvents();
if ((static::CRON_SCHEDULE === self::ON_SHUTDOWN || (count($this->consumedEvents) === 0 && empty($nextEvents))) && !in_array(Scheduler::CONTROL_MSG_STOP, $nextEvents, true)) {
if ((static::CRON_SCHEDULE === self::ON_SHUTDOWN || (empty($this->consumedEvents) && empty($nextEvents))) && !in_array(Scheduler::CONTROL_MSG_STOP, $nextEvents, true)) {
$nextEvents[] = Scheduler::CONTROL_MSG_STOP;
}
return $nextEvents;
Expand Down

0 comments on commit b95c56b

Please sign in to comment.