Conditions | 5 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
33 | public function __construct($name, $obj) |
||
34 | { |
||
35 | $this->name = $name; |
||
36 | |||
37 | $hasHref = empty($obj->href); |
||
38 | if ($hasHref && empty($obj->redirectHref)) { |
||
39 | throw new \InvalidArgumentException('Link is malformed. No href property'); |
||
40 | } |
||
41 | |||
42 | $this->href = !$hasHref ? $obj->href : $obj->redirectHref; |
||
43 | |||
44 | if (!empty($obj->title)) { |
||
45 | $this->title = $obj->title; |
||
46 | } |
||
47 | } |
||
48 | |||
79 |
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.