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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 34
rs 10
c 5
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
A boot() 0 9 2
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