henryejemuta /
laravel-vtpass
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Created By: Henry Ejemuta |
||
| 4 | * Project: laravel-vtpass |
||
| 5 | * Class Name: LaravelVTPassServiceProvider.php |
||
| 6 | * Date Created: 7/13/20 |
||
| 7 | * Time Created: 6:40 PM |
||
| 8 | */ |
||
| 9 | |||
| 10 | namespace HenryEjemuta\LaravelVTPass; |
||
| 11 | |||
| 12 | use HenryEjemuta\LaravelVTPass\Console\InstallLaravelVTPass; |
||
| 13 | use Illuminate\Support\ServiceProvider; |
||
| 14 | |||
| 15 | |||
| 16 | class LaravelVTPassServiceProvider extends ServiceProvider |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Indicates if loading of the provider is deferred. |
||
| 21 | * |
||
| 22 | * @var bool |
||
| 23 | */ |
||
| 24 | protected $defer = false; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * Boot the service provider. |
||
| 29 | */ |
||
| 30 | public function boot() |
||
| 31 | { |
||
| 32 | if (function_exists('config_path') && $this->app->runningInConsole()) { |
||
| 33 | $this->publishes([ |
||
| 34 | __DIR__ . '/../config/config.php' => config_path('vtpass.php'), |
||
| 35 | ], 'config'); |
||
| 36 | |||
| 37 | $this->commands([ |
||
| 38 | InstallLaravelVTPass::class, |
||
| 39 | ]); |
||
| 40 | |||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | |||
| 45 | /** |
||
| 46 | * Register the service provider. |
||
| 47 | * |
||
| 48 | * @return void |
||
| 49 | */ |
||
| 50 | public function register() |
||
| 51 | { |
||
| 52 | $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'vtpass'); |
||
| 53 | |||
| 54 | $this->app->singleton('vtpass', function ($app) { |
||
|
0 ignored issues
–
show
|
|||
| 55 | $baseUrl = config('vtpass.base_url'); |
||
| 56 | $instanceName = 'vtpass'; |
||
| 57 | |||
| 58 | |||
| 59 | return new VTPass( |
||
| 60 | $baseUrl, |
||
| 61 | $instanceName, |
||
| 62 | config('vtpass') |
||
| 63 | ); |
||
| 64 | }); |
||
| 65 | |||
| 66 | } |
||
| 67 | } |
||
| 68 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.