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.

DiscordServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 25
ccs 11
cts 11
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 11 1
1
<?php
2
3
namespace NotificationChannels\Discord;
4
5
use Illuminate\Support\ServiceProvider;
6
use NotificationChannels\Discord\Commands\SetupCommand;
7
8
class DiscordServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Register the application services.
12
     */
13 1
    public function register()
14
    {
15 1
        $this->app->bind('command.discord:setup', SetupCommand::class);
16 1
        $this->commands('command.discord:setup');
17
    }
18
19
    /**
20
     * Bootstrap the application services.
21
     */
22 1
    public function boot()
23
    {
24 1
        $token = $this->app->make('config')->get('services.discord.token');
25
26 1
        $this->app->when(Discord::class)
27 1
            ->needs('$token')
28 1
            ->give($token);
29
30 1
        $this->app->when(SetupCommand::class)
31 1
            ->needs('$token')
32 1
            ->give($token);
33
    }
34
}
35