1 | <?php |
||
9 | class Installer extends BaseInstaller implements InstallerContract |
||
10 | { |
||
11 | /** |
||
12 | * {@inheritdoc} |
||
13 | */ |
||
14 | protected $name = 'install:events'; |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | protected $description = 'Installs the illuminate/events related generator commands'; |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | public function getComponentName(): string |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function install(): bool |
||
40 | |||
41 | /** |
||
42 | * Installs the application-level EventServiceProvider where users can register their |
||
43 | * custom events and event listeners. |
||
44 | */ |
||
45 | protected function installServiceProvider() |
||
56 | |||
57 | /** |
||
58 | * Get the stub file for the generator. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | protected function getStub() |
||
66 | } |
||
67 |
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.