GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 0894f3...553446 )
by Florian
12s
created

TwilioProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 16
ccs 0
cts 15
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
crap 2
1
<?php
2
3
namespace NotificationChannels\Twilio;
4
5
use Illuminate\Support\ServiceProvider;
6
use Twilio\Rest\Client as TwilioService;
7
8
class TwilioProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        $this->app->when(TwilioChannel::class)
16
            ->needs(Twilio::class)
17
            ->give(function () {
18
                return new Twilio(
19
                    $this->app->make(TwilioService::class),
20
                    $this->app->make(TwilioConfig::class)
21
                );
22
            });
23
24
        $this->app->bind(TwilioService::class, function () {
25
            $config = $this->app['config']['services.twilio'];
26
            return new TwilioService($config['account_sid'], $config['auth_token']);
27
        });
28
    }
29
30
    /**
31
     * Register the application services.
32
     */
33
    public function register()
34
    {
35
        $this->app->bind(TwilioConfig::class, function () {
36
            return new TwilioConfig($this->app['config']['services.twilio']);
37
        });
38
    }
39
}
40