1 | <?php |
||
8 | class Link |
||
9 | { |
||
10 | /** |
||
11 | * @var string link href. Currently it's taken from the href or redirectHref property. |
||
12 | */ |
||
13 | private $href; |
||
14 | |||
15 | /** |
||
16 | * @var string|null link title, can be null. |
||
17 | */ |
||
18 | private $title = null; |
||
19 | |||
20 | /** |
||
21 | * @var string link name it's used as key in the Links class. |
||
22 | */ |
||
23 | private $name; |
||
24 | |||
25 | /** |
||
26 | * Link constructor. |
||
27 | * |
||
28 | * @param string $name. |
||
|
|||
29 | * @param \stdClass $obj. |
||
30 | * |
||
31 | * @throws \InvalidArgumentException if there isn't a href property on the $obj. |
||
32 | */ |
||
33 | public function __construct($name, $obj) |
||
48 | |||
49 | /** |
||
50 | * Returns link location. |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getHref() |
||
58 | |||
59 | /** |
||
60 | * Return link title, if any. |
||
61 | * |
||
62 | * @return null|string |
||
63 | */ |
||
64 | public function getTitle() |
||
68 | |||
69 | /** |
||
70 | * Returns link name e.g: "self". This is also the key used in the Links class. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getName() |
||
78 | } |
||
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.