Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 0 |
1 | <?php |
||
39 | 9 | public function append($rules) { |
|
40 | 9 | if (is_array($rules)) { |
|
41 | $rules = static::fromArray($rules); |
||
42 | } |
||
43 | |||
44 | 9 | $this->rules = array_replace_recursive($this->rules, $rules->getRules()); |
|
45 | 9 | $this->attributes = array_replace_recursive($this->attributes, $rules->getAttributes()); |
|
46 | 9 | $this->messages = array_replace_recursive($this->messages, $rules->getMessages()); |
|
47 | |||
48 | 9 | return $this; |
|
49 | } |
||
50 | |||
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.