| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class TelegramLoginWidgetServiceProvider extends ServiceProvider |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Perform post-registration booting of services. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function boot() |
||
| 15 | { |
||
| 16 | // Publishing is only necessary when using the CLI. |
||
| 17 | if ($this->app->runningInConsole()) { |
||
| 18 | $this->bootForConsole(); |
||
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Register any package services. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function register() |
||
| 28 | { |
||
| 29 | $this->mergeConfigFrom(__DIR__.'/../config/telegramloginwidget.php', 'telegramloginwidget'); |
||
| 30 | |||
| 31 | $this->app->singleton(TelegramLoginWidget::class, function () { |
||
| 32 | return new TelegramLoginWidget; |
||
| 33 | }); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Console-specific booting. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | protected function bootForConsole() |
||
| 47 | } |
||
| 48 | } |
||
| 49 |