1 | <?php |
||
12 | class AccessServiceProvider extends ServiceProvider |
||
13 | { |
||
14 | /** |
||
15 | * Indicates if loading of the provider is deferred. |
||
16 | * |
||
17 | * @var bool |
||
18 | */ |
||
19 | protected $defer = false; |
||
20 | |||
21 | /** |
||
22 | * Package boot method. |
||
23 | */ |
||
24 | public function boot() |
||
28 | |||
29 | /** |
||
30 | * Register the service provider. |
||
31 | * |
||
32 | * @return void |
||
33 | */ |
||
34 | public function register() |
||
39 | |||
40 | /** |
||
41 | * Register the application bindings. |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | private function registerAccess() |
||
51 | |||
52 | /** |
||
53 | * Register the vault facade without the user having to add it to the app.php file. |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | public function registerFacade() |
||
64 | |||
65 | /** |
||
66 | * Register the blade extender to use new blade sections. |
||
67 | */ |
||
68 | protected function registerBladeExtensions() |
||
71 | } |
||
72 |
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.