ZonerSmsGatewayServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 27
ccs 0
cts 16
cp 0
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 14 1
A register() 0 3 1
1
<?php
2
3
namespace NotificationChannels\ZonerSmsGateway;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ZonerSmsGatewayServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        $this->app->when(ZonerSmsGatewayChannel::class)
15
            ->needs(ZonerSmsGateway::class)
16
            ->give(function () {
17
                $zonerSmsGatewayConfig = config('services.zoner-sms-gateway');
18
19
                return new ZonerSmsGateway(
20
                    $zonerSmsGatewayConfig['username'],
21
                    $zonerSmsGatewayConfig['password'],
22
                    $zonerSmsGatewayConfig['sender']
23
                );
24
            });
25
    }
26
27
    /**
28
     * Register the application services.
29
     */
30
    public function register()
31
    {
32
    }
33
}
34