1 | <?php |
||
9 | class AppServiceProvider extends ServiceProvider |
||
10 | { |
||
11 | /** |
||
12 | * Bootstrap any application services. |
||
13 | * |
||
14 | * @return void |
||
15 | */ |
||
16 | 90 | public function boot() |
|
17 | { |
||
18 | 90 | if ($this->app->environment('local')) { |
|
|
|||
19 | $this->app->register('Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider'); |
||
20 | } |
||
21 | 90 | if (DB::connection() instanceof SQLiteConnection) { |
|
22 | 90 | DB::statement(DB::raw('PRAGMA foreign_keys=1')); |
|
23 | } |
||
24 | 90 | } |
|
25 | |||
26 | /** |
||
27 | * Register any application services. |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | 90 | public function register() |
|
35 | } |
||
36 |
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.