Skip to content

Commit

Permalink
[mod] ::next() 判定
Browse files Browse the repository at this point in the history
  • Loading branch information
chanshige committed Feb 13, 2024
1 parent a828476 commit aab44a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Enum/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public function equals(Status $status): bool
return $this === $status;
}

public function isNext(Status $status): bool
{
return $this->next() === $status;
}

public function next(): self
{
return match ($this) {
Expand Down

0 comments on commit aab44a7

Please sign in to comment.