| 1 | <?php |
||
| 5 | class Rules |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var array |
||
| 10 | */ |
||
| 11 | protected $rules; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | protected $attributes; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $messages; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param array $rules |
||
| 25 | * @param array $attributes |
||
| 26 | * @param array $messages |
||
| 27 | */ |
||
| 28 | 9 | public function __construct(array $rules, array $attributes = [], array $messages = []) { |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param array $rules |
||
| 36 | * @param array $attributes |
||
|
|
|||
| 37 | * @param array $messages |
||
| 38 | */ |
||
| 39 | 9 | public function append($rules) { |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @return array |
||
| 53 | */ |
||
| 54 | 9 | public function getRules() { |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return array |
||
| 60 | */ |
||
| 61 | 9 | public function getAttributes() { |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return array |
||
| 67 | */ |
||
| 68 | 9 | public function getMessages() { |
|
| 71 | |||
| 72 | /** |
||
| 73 | * @param array[] $rules |
||
| 74 | * @return static |
||
| 75 | */ |
||
| 76 | static public function fromArray($rules) { |
||
| 89 | |||
| 90 | } |
||
| 91 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.