We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1fd916 commit 86949d6Copy full SHA for 86949d6
src/Enum.php
@@ -76,9 +76,8 @@ public function getValue()
76
* Returns the enum key (i.e. the constant name).
77
*
78
* @psalm-pure
79
- * @return mixed
80
*/
81
- public function getKey()
+ public function getKey(): string
82
{
83
return static::search($this->value);
84
}
@@ -193,11 +192,11 @@ public static function isValidKey($key)
193
192
/**
194
* Return key for value
195
196
- * @param $value
+ * @param mixed $value
197
198
* @psalm-param mixed $value
199
200
+ * @return string|false
201
202
public static function search($value)
203
0 commit comments