Skip to content

Commit 86949d6

Browse files
committed
Add getKey() return type as string
1 parent a1fd916 commit 86949d6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Enum.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ public function getValue()
7676
* Returns the enum key (i.e. the constant name).
7777
*
7878
* @psalm-pure
79-
* @return mixed
8079
*/
81-
public function getKey()
80+
public function getKey(): string
8281
{
8382
return static::search($this->value);
8483
}
@@ -193,11 +192,11 @@ public static function isValidKey($key)
193192
/**
194193
* Return key for value
195194
*
196-
* @param $value
195+
* @param mixed $value
197196
*
198197
* @psalm-param mixed $value
199198
* @psalm-pure
200-
* @return mixed
199+
* @return string|false
201200
*/
202201
public static function search($value)
203202
{

0 commit comments

Comments
 (0)