diff --git a/src/Enum.php b/src/Enum.php index 92a42a4..1d4f7ec 100644 --- a/src/Enum.php +++ b/src/Enum.php @@ -83,9 +83,8 @@ public function getValue() * Returns the enum key (i.e. the constant name). * * @psalm-pure - * @return mixed */ - public function getKey() + public function getKey(): string { return static::search($this->value); } @@ -200,11 +199,11 @@ public static function isValidKey($key) /** * Return key for value * - * @param $value + * @param mixed $value * * @psalm-param mixed $value * @psalm-pure - * @return mixed + * @return string|false */ public static function search($value) {