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 ( b62982...d1158c )
by Freek
02:01
created

SlashCommandServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Spatie\SlashCommand;
4
5
use Illuminate\Support\ServiceProvider;
6
use Spatie\SlashCommand\SlashCommandHandler\Collection;
7
use Spatie\SlashCommand\SlashCommandRequest;
8
9
class SlashCommandServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__.'/../config/laravel-slack-slash-command.php' => config_path('laravel-slack-slash-command.php'),
18
        ], 'config');
19
20
        $this->app['router']->get(config('laravel-slack-slash-command.url'), function () {
21
22
            $slashCommandRequest = SlashCommandRequest::createForRequest(request());
23
24
            $slashCommandHandlers = new Collection(config('laravel-slack-slash-command.handlers'), $slashCommandRequest);
25
26
            return $slashCommandHandlers->getResponse();
27
        });
28
    }
29
30
    /**
31
     * Register the application services.
32
     */
33
    public function register()
34
    {
35
        $this->mergeConfigFrom(__DIR__.'/../config/laravel-slack-slash-command.php', 'laravel-slack-slash-command');
36
    }
37
}
38