| 1 | <?php |
||
| 2 | |||
| 3 | namespace NotificationChannels\TurboSms; |
||
| 4 | |||
| 5 | use Illuminate\Support\ServiceProvider; |
||
| 6 | |||
| 7 | class TurboSmsServiceProvider extends ServiceProvider |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Register the application services. |
||
| 11 | */ |
||
| 12 | public function register() |
||
| 13 | { |
||
| 14 | $this->app->singleton(TurboSmsApi::class, function ($app) { |
||
|
0 ignored issues
–
show
|
|||
| 15 | $apiToken = $this->app['config']['services.turbosms.api_token']; |
||
| 16 | $sender = $this->app['config']['services.turbosms.sender']; |
||
| 17 | |||
| 18 | $client = new TurboSmsApi($apiToken, $sender, $this->app['config']['services.turbosms']); |
||
| 19 | |||
| 20 | return $client; |
||
| 21 | }); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function provides(): array |
||
| 25 | { |
||
| 26 | return [ |
||
| 27 | TurboSmsApi::class, |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.