1 | <?php |
||
11 | class Message { |
||
12 | |||
13 | /** |
||
14 | * @var File |
||
15 | */ |
||
16 | private $file; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $text; |
||
22 | |||
23 | |||
24 | /** |
||
25 | * @var FileTool |
||
26 | */ |
||
27 | private $tool; |
||
28 | |||
29 | /** |
||
30 | * @var int|null |
||
31 | */ |
||
32 | private $line; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * @param File $file |
||
37 | * @param FileTool $tool |
||
38 | * @param $text |
||
39 | * @param int|null $line |
||
40 | * @param int $level |
||
|
|||
41 | */ |
||
42 | 18 | public function __construct(File $file, FileTool $tool, $text, $line) { |
|
49 | |||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getText() { |
||
57 | |||
58 | |||
59 | /** |
||
60 | * @return File |
||
61 | */ |
||
62 | public function getFile() { |
||
65 | |||
66 | |||
67 | /** |
||
68 | * @return int|null |
||
69 | */ |
||
70 | 7 | public function getLine() { |
|
73 | |||
74 | |||
75 | /** |
||
76 | * @return FileTool |
||
77 | */ |
||
78 | public function getTool() { |
||
81 | |||
82 | } |
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.