ExponentServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
1
<?php
2
3
namespace NotificationChannels\Exponent;
4
5
use GuzzleHttp\Client;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Class ExponentServiceProvider.
10
 */
11
class ExponentServiceProvider extends ServiceProvider
12
{
13
    /**
14
     * Bootstrap the application services.
15
     */
16
    public function boot()
17
    {
18
        $this->app->when(ExponentChannel::class)
19
            ->needs(Client::class)
20
            ->give(function () {
21
                return new Client([
22
                    'base_uri' => config('broadcasting.connections.exponent.url', ExponentChannel::DEFAULT_API_URL),
23
                ]);
24
            });
25
    }
26
}
27