From 25f544c4517f608ba80548a006f8b64666aeeacb Mon Sep 17 00:00:00 2001 From: Mark <14284867+xHeaven@users.noreply.github.com> Date: Sun, 29 Dec 2024 07:43:15 +0100 Subject: [PATCH] Use proper type for is and isNot methods --- src/Comparable.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Comparable.php b/src/Comparable.php index c655912..903edb4 100644 --- a/src/Comparable.php +++ b/src/Comparable.php @@ -7,15 +7,16 @@ namespace ArchTech\Enums; use Exception; use Iterator; use IteratorAggregate; +use UnitEnum; trait Comparable { - public function is(mixed $enum): bool + public function is(UnitEnum $enum): bool { return $this === $enum; } - public function isNot(mixed $enum): bool + public function isNot(UnitEnum $enum): bool { return ! $this->is($enum); }