Skip to content

Commit

Permalink
Make is/isNot take UnitEnum instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
xHeaven committed Dec 27, 2024
1 parent 8a30e71 commit 5949f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EnumConcern.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ public static function hasName(string $name): bool
/**
* Compares two enum instances for equality.
*/
public function is(self $other): bool
public function is(UnitEnum $other): bool
{
return $this === $other;
}

/**
* Checks if two enum instances are not equal.
*/
public function isNot(self $other): bool
public function isNot(UnitEnum $other): bool
{
return !$this->is($other);
}
Expand Down

0 comments on commit 5949f7a

Please sign in to comment.