Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | 144 | public function __construct($data) |
|
18 | { |
||
19 | 144 | if ($data instanceof Request) { |
|
20 | 105 | $array = $data->send()->json(); |
|
21 | 144 | } elseif (is_string($data)) { |
|
22 | 6 | $array = array($this->idColumn => $data); |
|
23 | 6 | } else { |
|
24 | 33 | $array = (array) $data; |
|
25 | } |
||
26 | 144 | parent::__construct($array); |
|
27 | 144 | } |
|
28 | |||
56 |
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.