Completed
Push — master ( b2b309...d9443d )
by Casper
06:29 queued 02:05
created

PushoverServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
crap 1
1
<?php
2
3
namespace NotificationChannels\Pushover;
4
5
use GuzzleHttp\Client as HttpClient;
6
use Illuminate\Support\ServiceProvider;
7
8
class PushoverServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13 1
    public function boot()
14
    {
15 1
        $this->app->when(PushoverChannel::class)
16 1
            ->needs(Pushover::class)
17 1
            ->give(function () {
18 1
                return new Pushover(new HttpClient(), config('services.pushover.token'));
19 1
            });
20 1
    }
21
22
    /**
23
     * Register the application services.
24
     */
25
    public function register()
26
    {
27
    }
28
}
29