| 1 | <?php |
||
| 13 | class SchemaEnum |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $values; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Constructor |
||
| 22 | * |
||
| 23 | * @param array $values enum values |
||
| 24 | */ |
||
| 25 | public function __construct(array $values) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * gets properties |
||
| 32 | * |
||
| 33 | * @return Schema|boolean properties |
||
|
|
|||
| 34 | */ |
||
| 35 | public function getValues() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * sets properties |
||
| 42 | * |
||
| 43 | * @param array $values enum values |
||
| 44 | * |
||
| 45 | * @return void |
||
| 46 | */ |
||
| 47 | public function setValues(array $values) |
||
| 51 | } |
||
| 52 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]orarray<String>.