Skip to content

Commit 967787b

Browse files
author
Andrew Gilbert
committed
Add more-specific Psalm return types
Might as well be more precise about this, as Psalm supports doing so.
1 parent e58f812 commit 967787b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Enum.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ final public function equals($variable = null): bool
109109
* Returns the names (keys) of all constants in the Enum class
110110
*
111111
* @psalm-external-mutation-free
112+
* @psalm-return list<string>
112113
* @return array
113114
*/
114115
public static function keys()
@@ -120,6 +121,7 @@ public static function keys()
120121
* Returns instances of the Enum class of all Enum constants
121122
*
122123
* @psalm-external-mutation-free
124+
* @psalm-return array<string, static>
123125
* @return static[] Constant name in key, Enum instance in value
124126
*/
125127
public static function values()

0 commit comments

Comments
 (0)