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 ( 338b8a...0b0e53 )
by Dwight
14s queued 14s
created

ApnServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 10
cp 0
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace NotificationChannels\Apn;
4
5
use Pushok\Client;
6
use Pushok\AuthProvider\Token;
7
use Illuminate\Support\ServiceProvider;
8
9
class ApnServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register any application services.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        $this->app->bind(Token::class, function ($app) {
19
            return Token::create([
20
                'key_id' => $app['config']['broadcasting.connections.apn.key_id'],
21
                'team_id' => $app['config']['broadcasting.connections.apn.team_id'],
22
                'app_bundle_id' => $app['config']['broadcasting.connections.apn.app_bundle_id'],
23
                'private_key_path' => $app['config']['broadcasting.connections.apn.private_key_path'],
24
                'private_key_secret' => $app['config']['broadcasting.connections.apn.private_key_secret'],
25
            ]);
26
        });
27
28
        $this->app->bind(Client::class, function ($app) {
29
            $production = $app['config']['broadcasting.connections.apn.environment'] === ApnChannel::PRODUCTION;
30
31
            return new Client($app->make(Token::class), $production);
32
        });
33
    }
34
}
35