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   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 26
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 18 1
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