diff --git a/src/Comparable.php b/src/Comparable.php new file mode 100644 index 0000000..d47de19 --- /dev/null +++ b/src/Comparable.php @@ -0,0 +1,28 @@ +is($enum); + } + + public function in(array $enums): bool + { + return [] !== array_filter($enums, fn (mixed $enum) => $this->is($enum)); + } + + public function notIn(array $enums): bool + { + return ! $this->in($enums); + } +}