| 1 | <?php |
||
| 12 | trait ConstantsTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Fetch all constants of enum class |
||
| 16 | * |
||
| 17 | * @return array |
||
|
|
|||
| 18 | */ |
||
| 19 | public static function getConstants() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Helper for getConstants() |
||
| 26 | * |
||
| 27 | * @return array |
||
| 28 | */ |
||
| 29 | public static function toArray() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Check if given value is valid value |
||
| 36 | * |
||
| 37 | * @param mixed $value |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public static function isValid($value) |
||
| 44 | } |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.