1 | <?php |
||
8 | final class Primitive |
||
9 | { |
||
10 | /** @var string */ |
||
11 | private $name; |
||
12 | /** @var array */ |
||
13 | private $src_stubs; |
||
14 | /** @var array */ |
||
15 | private $test_stubs; |
||
16 | |||
17 | /** |
||
18 | * Primitive constructor. |
||
19 | * |
||
20 | * @param string $name |
||
21 | * @param string $alias |
||
|
|||
22 | * @param array $src_stubs |
||
23 | * @param array $test_stubs |
||
24 | */ |
||
25 | 4 | public function __construct($name, array $src_stubs, array $test_stubs) |
|
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | 3 | public function getName(): string |
|
41 | |||
42 | /** |
||
43 | * @return array |
||
44 | */ |
||
45 | 3 | public function getSrcStubs(): array |
|
49 | |||
50 | /** |
||
51 | * @return array |
||
52 | */ |
||
53 | 3 | public function getTestStubs(): array |
|
57 | |||
58 | 4 | private function validate() |
|
64 | } |
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.