From 5949f7a6c5993b34ce234e618caf4ee4bd6aee25 Mon Sep 17 00:00:00 2001 From: Mark <14284867+xHeaven@users.noreply.github.com> Date: Fri, 27 Dec 2024 19:20:33 +0100 Subject: [PATCH] Make is/isNot take UnitEnum instead of self --- src/EnumConcern.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EnumConcern.php b/src/EnumConcern.php index 28f2bb1..a190a40 100755 --- a/src/EnumConcern.php +++ b/src/EnumConcern.php @@ -126,7 +126,7 @@ 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; } @@ -134,7 +134,7 @@ public function is(self $other): bool /** * Checks if two enum instances are not equal. */ - public function isNot(self $other): bool + public function isNot(UnitEnum $other): bool { return !$this->is($other); }