1 | <?php |
||
15 | class ChannelServiceProvider extends ServiceProvider |
||
16 | { |
||
17 | /** |
||
18 | * Register application services. |
||
19 | */ |
||
20 | 88 | public function register(): void |
|
24 | |||
25 | /** |
||
26 | * Boot application services. |
||
27 | */ |
||
28 | 88 | public function boot(): void |
|
41 | |||
42 | /** |
||
43 | * Define bot channels. |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | 88 | protected function channels(): array |
|
51 | |||
52 | private function registerManager(): void |
||
60 | } |
||
61 |
This check compares calls to functions or methods with their respective definitions. If the call has more 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.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.