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 ( 77611e...8ec286 )
by Pascal
03:57 queued 11s
created

PaddleServiceProvider::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 9.6666
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace ProtoneMedia\LaravelPaddle;
4
5
use Illuminate\Support\Facades\Blade;
6
use Illuminate\Support\Facades\Route;
7
use Illuminate\Support\ServiceProvider;
8
use ProtoneMedia\LaravelPaddle\Api\Api;
9
use ProtoneMedia\LaravelPaddle\Http\WebhookController;
10
use Zttp\PendingZttpRequest;
11
12
class PaddleServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * Bootstrap the application services.
16
     */
17
    public function boot()
18
    {
19
        if ($this->app->runningInConsole()) {
20
            $this->publishes([
21
                __DIR__ . '/../config/config.php' => config_path('paddle.php'),
22
            ], 'config');
23
24
            $this->publishes([
25
                __DIR__ . '/../resources/views' => base_path('resources/views/vendor/paddle'),
26
            ], 'views');
27
        }
28
29
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'paddle');
30
31
        Blade::directive('paddle', function () {
32
            return "<?php echo view('paddle::javaScriptSetup'); ?>";
33
        });
34
    }
35
36
    /**
37
     * Register the application services.
38
     */
39
    public function register()
40
    {
41
        $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'paddle');
42
43
        $this->app->singleton('laravel-paddle', function () {
44
            return new Api;
45
        });
46
47
        $this->app->singleton('laravel-paddle.http', function () {
48
            return new PendingZttpRequest;
49
        });
50
51
        Route::post(config('paddle.webhook_uri'), WebhookController::class);
52
    }
53
}
54