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.

LeverPhpServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 9
rs 10
c 2
b 0
f 0
1
<?php
2
3
namespace ViaWork\LeverPhp;
4
5
use Illuminate\Support\ServiceProvider;
6
use ViaWork\LeverPhp\Facade\Lever;
7
8
class LeverPhpServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
16
        // $this->loadRoutesFrom(__DIR__.'/routes.php');
17
18
        if ($this->app->runningInConsole()) {
19
            $this->publishes([
20
                __DIR__.'/../config/config.php' => config_path('lever-php.php'),
21
            ], 'config');
22
23
            // Registering package commands.
24
            // $this->commands([]);
25
        }
26
    }
27
28
    /**
29
     * Register the application services.
30
     */
31
    public function register()
32
    {
33
        // Automatically apply the package configuration
34
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'lever');
35
36
        // Register the main class to use with the facade
37
        $this->app->singleton('lever-php', static function () {
38
            return new LeverPhp(config('lever.key'), null, new LaravelRateLimiterStore());
39
        });
40
41
        $this->app->alias(Lever::class, 'Lever');
42
    }
43
}
44