Total Complexity | 8 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class EventManager |
||
9 | { |
||
10 | private $events; |
||
11 | |||
12 | private $data = []; |
||
13 | |||
14 | /** |
||
15 | * BasicEventManager constructor. |
||
16 | * |
||
17 | * @param $events |
||
18 | * |
||
19 | * @return EventManager |
||
20 | */ |
||
21 | 10 | public function init(array $events): self |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param $listener |
||
30 | */ |
||
31 | 10 | public function commitChain(callable $listener) |
|
36 | 10 | } |
|
37 | |||
38 | 101 | public function start() |
|
42 | } |
||
43 | 101 | } |
|
44 | |||
45 | 2 | public function forgetAbout($events) |
|
56 |
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.