WorkplaceServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace NotificationChannels\Workplace;
4
5
use GuzzleHttp\Client as HttpClient;
6
use GuzzleHttp\ClientInterface;
7
use Illuminate\Support\ServiceProvider;
8
9
class WorkplaceServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot()
15
    {
16
        $this->app->when(WorkplaceChannel::class)
17
            ->needs(ClientInterface::class)
18
            ->give(function ($app) {
19
                return $app->make(HttpClient::class);
20
            });
21
    }
22
}
23