Total Complexity | 4 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class ClientServiceProvider extends LaravelServiceProvider implements DeferrableProvider |
||
21 | { |
||
22 | /** |
||
23 | * Bootstrap services. |
||
24 | * |
||
25 | * @return void |
||
26 | */ |
||
27 | public function boot() |
||
28 | { |
||
29 | // |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Register services. |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | public function register() |
||
38 | { |
||
39 | $this->registerClient(); |
||
40 | |||
41 | $this->app->alias(ClickUp::class, 'ClickUp'); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Get the services provided by the provider. |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | public function provides() |
||
54 | ]; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * Register the client |
||
59 | * |
||
60 | * If the ClickUp id or roles are null, then assume sensible values via the API |
||
61 | */ |
||
62 | protected function registerClient(): void |
||
75 | } |
||
76 | ); |
||
77 | } |
||
79 |
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. Please note the @ignore annotation hint above.