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