These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Artesaos\Moip\Providers; |
||
4 | |||
5 | use Artesaos\Moip\Moip; |
||
6 | use Illuminate\Support\ServiceProvider; |
||
7 | |||
8 | class MoipServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Indicates if loading of the provider is deferred. |
||
12 | * |
||
13 | * @var bool |
||
14 | */ |
||
15 | protected $defer = true; |
||
16 | |||
17 | /** |
||
18 | * Bootstrap the application events. |
||
19 | */ |
||
20 | public function boot() |
||
21 | { |
||
22 | $config_file = __DIR__.'/../../config/moip.php'; |
||
23 | |||
24 | if ($this->isLumen()) { |
||
25 | $this->app->configure('moip'); |
||
0 ignored issues
–
show
|
|||
26 | } else { |
||
27 | $this->publishes([$config_file => config_path('moip.php')]); |
||
28 | } |
||
29 | |||
30 | $this->mergeConfigFrom($config_file, 'moip'); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Register the service provider. |
||
35 | */ |
||
36 | public function register() |
||
37 | { |
||
38 | $this->app->singleton('moip', Moip::class); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Get the services provided by the provider. |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | public function provides() |
||
47 | { |
||
48 | return ['moip']; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return bool |
||
53 | */ |
||
54 | private function isLumen() |
||
55 | { |
||
56 | return true === str_contains($this->app->version(), 'Lumen'); |
||
57 | } |
||
58 | } |
||
59 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.