| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class SnsServiceProvider extends ServiceProvider |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Bootstrap the application services. |
||
| 13 | */ |
||
| 14 | 2 | public function boot() |
|
| 15 | { |
||
| 16 | 2 | $this->app->when(SnsChannel::class) |
|
| 17 | 2 | ->needs(Sns::class) |
|
| 18 | ->give(function () { |
||
| 19 | 2 | return new Sns($this->app->make(SnsService::class)); |
|
| 20 | 2 | }); |
|
| 21 | |||
| 22 | $this->app->bind(SnsService::class, function () { |
||
| 23 | 2 | $config = array_merge(['version' => 'latest'], $this->app['config']['services.sns']); |
|
| 24 | |||
| 25 | 2 | return new SnsService($this->addSnsCredentials($config)); |
|
| 26 | 2 | }); |
|
| 27 | 2 | } |
|
| 28 | |||
| 29 | 2 | protected function addSnsCredentials($config): array |
|
| 36 | } |
||
| 37 | } |
||
| 38 |