1 | <?php |
||
5 | abstract class AbstractEnum |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | protected static $cache = []; |
||
11 | |||
12 | /** |
||
13 | * @return string[] |
||
|
|||
14 | */ |
||
15 | public static function keys() |
||
19 | |||
20 | /** |
||
21 | * @return string[] |
||
22 | */ |
||
23 | public static function values() |
||
34 | |||
35 | /** |
||
36 | * @param string $value |
||
37 | * |
||
38 | * @return bool |
||
39 | */ |
||
40 | public static function hasValue($value) |
||
44 | |||
45 | /** |
||
46 | * @throws \InvalidArgumentException |
||
47 | * |
||
48 | * @param string $value |
||
49 | */ |
||
50 | public static function checkValue($value) |
||
58 | } |
||
59 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.