1 | <?php |
||||||
2 | |||||||
3 | namespace App\Providers; |
||||||
4 | |||||||
5 | use Illuminate\Support\ServiceProvider; |
||||||
6 | use Illuminate\Support\Facades\URL; |
||||||
7 | |||||||
8 | class AppServiceProvider extends ServiceProvider |
||||||
9 | { |
||||||
10 | /** |
||||||
11 | * Register any application services. |
||||||
12 | * |
||||||
13 | * @return void |
||||||
14 | */ |
||||||
15 | public function register() |
||||||
16 | { |
||||||
17 | if ($this->app->environment() == 'local') { |
||||||
0 ignored issues
–
show
|
|||||||
18 | $this->app->register('\Laracademy\ModelGenerator\ModelGeneratorServiceProvider'); |
||||||
0 ignored issues
–
show
The call to
Tests\Laravel\App::register() has too many arguments starting with '\Laracademy\ModelGenera...neratorServiceProvider' .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
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. ![]() |
|||||||
19 | } |
||||||
20 | // |
||||||
21 | } |
||||||
22 | |||||||
23 | /** |
||||||
24 | * Bootstrap any application services. |
||||||
25 | * |
||||||
26 | * @return void |
||||||
27 | */ |
||||||
28 | public function boot() |
||||||
29 | { |
||||||
30 | // |
||||||
31 | if(!(\App::environment('local'))) { |
||||||
32 | URL::forceScheme('https'); |
||||||
33 | } |
||||||
34 | } |
||||||
35 | } |
||||||
36 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.