| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 11 | class OpenWeatherServiceProvider extends ServiceProvider |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Register any application services. |
||
| 15 | * |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | public function register() |
||
| 19 | { |
||
| 20 | $this->app->singleton(WeatherClient::class, function () { |
||
| 21 | return new WeatherClient( |
||
| 22 | [ |
||
| 23 | 'base_uri' => config('open-weather.base_uri'), |
||
| 24 | ] |
||
| 25 | ); |
||
| 26 | }); |
||
| 27 | |||
| 28 | $this->mergeConfigFrom(__DIR__.'/../config/open-weather.php', 'open-weather'); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Bootstrap any application services. |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | public function boot() |
||
| 42 | ); |
||
| 43 | } |
||
| 45 |