1 | <?php |
||
16 | class EventManager |
||
17 | { |
||
18 | /** |
||
19 | * List with all events. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $list = []; |
||
24 | /** |
||
25 | * Array of events. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $namespaces; |
||
30 | /** |
||
31 | * Project root directory. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $rootDir; |
||
36 | |||
37 | /** |
||
38 | * EventManager constructor. |
||
39 | */ |
||
40 | public function __construct(string $rootDir, array $namespaces = []) |
||
45 | |||
46 | /** |
||
47 | * Get events list. |
||
48 | */ |
||
49 | public function getList(): array |
||
67 | |||
68 | /** |
||
69 | * Resolve the given class. |
||
70 | */ |
||
71 | public function resolve(string $name): EventInterface |
||
79 | |||
80 | /** |
||
81 | * @param string $id |
||
|
|||
82 | */ |
||
83 | public function addEvent(EventInterface $event) |
||
91 | } |
||
92 |
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.