1 | <?php |
||
5 | class Referral |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private $ref; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $source; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $type; |
||
21 | |||
22 | /** |
||
23 | * @param string $payload |
||
|
|||
24 | */ |
||
25 | 5 | public function __construct($ref, $source, $type) |
|
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | 1 | public function getRef() |
|
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | 1 | public function getSource() |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | 1 | public function getType() |
|
55 | |||
56 | /** |
||
57 | * @param array $payload |
||
58 | * |
||
59 | * @return static |
||
60 | */ |
||
61 | 1 | public static function create(array $payload) |
|
65 | } |
||
66 |
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.