Skip to content

Commit 58a6574

Browse files
Update app/Models/PeriodicEvent.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 922f480 commit 58a6574

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

app/Models/PeriodicEvent.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,7 @@ public function deadline(): ?Carbon
101101
*/
102102
public function isActive(): bool
103103
{
104-
if ($this->startDate()->isFuture()) {
105-
return false;
106-
}
107-
if ($this->endDate()->isPast()) {
108-
return false;
109-
}
110-
return true;
104+
return !$this->startDate()->isFuture() && !$this->endDate()->isPast();
111105
}
112106

113107
/**

0 commit comments

Comments
 (0)