SMS77ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 13 1
A register() 0 3 1
1
<?php
2
3
namespace NotificationChannels\SMS77;
4
5
use GuzzleHttp\Client as HttpClient;
6
use Illuminate\Support\ServiceProvider;
7
8
class SMS77ServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        $this->app->when(SMS77Channel::class)
16
            ->needs(SMS77::class)
17
            ->give(function () {
18
                $apiKey = config('services.sms77.api_key');
19
20
                return new SMS77(
21
                    $apiKey,
22
                    new HttpClient()
23
                );
24
            });
25
    }
26
27
    /**
28
     * Register the application services.
29
     */
30
    public function register()
31
    {
32
    }
33
}
34