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
Pull Request — master (#17)
by Casper
02:30
created

TwilioProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Test Coverage

Coverage 90%

Importance

Changes 8
Bugs 4 Features 2
Metric Value
wmc 2
c 8
b 4
f 2
lcom 1
cbo 5
dl 0
loc 35
ccs 18
cts 20
cp 0.9
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 22 1
A register() 0 3 1
1
<?php
2
3
namespace NotificationChannels\Twilio;
4
5
use Illuminate\Support\ServiceProvider;
6
use Services_Twilio as TwilioService;
7
8
class TwilioProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13 1
    public function boot()
14
    {
15 1
        $this->app->when(TwilioChannel::class)
16 1
            ->needs(Twilio::class)
17
            ->give(function () {
18 1
                return new Twilio(
19 1
                    $this->app->make(TwilioService::class),
20 1
                    $this->app['config']['services.twilio.from']
21 1
                );
22 1
            });
23
24 1
        $this->app->when(Twilio::class)
25 1
            ->needs(TwilioService::class)
26 1
            ->give(function () {
27 1
                $config = $this->app['config']['services.twilio'];
28
29 1
                return new TwilioService(
30 1
                    $config['account_sid'],
31 1
                    $config['auth_token']
32 1
                );
33 1
            });
34 1
    }
35
36
    /**
37
     * Register the application services.
38
     */
39
    public function register()
40
    {
41
    }
42
}
43