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.

LarsignServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 43
ccs 12
cts 14
cp 0.8571
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 10 1
A provides() 0 4 1
A configPath() 0 4 1
1
<?php
2
3
namespace HavenShen\Larsign;
4
5
use HavenShen\Larsign\LarsignService;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * LarsignServiceProvider
10
 *
11
 * @author    Haven Shen <[email protected]>
12
 * @copyright    Copyright (c) Haven Shen
13
 */
14
class LarsignServiceProvider extends ServiceProvider
15
{
16
    /**
17
     * Bootstrap the application services.
18
     *
19
     * @return void
20
     */
21 2
    public function boot()
22
    {
23 2
        $this->publishes([$this->configPath() => config_path('larsign.php')]);
24 2
    }
25
26
    /**
27
     * Register the application services.
28
     *
29
     * @return void
30
     */
31 2
    public function register()
32
    {
33 2
        $this->mergeConfigFrom($this->configPath(), 'larsign');
34
35 2
        $this->app->bind(LarsignService::class, function ($app) {
36 2
            return new LarsignService($app['config']->get('larsign'));
37 2
        });
38
39 2
        $this->app->alias(LarsignService::class, 'larsign');
40 2
    }
41
42
    /**
43
     * Get the services provided by the provider.
44
     *
45
     * @return array
46
     */
47
    public function provides()
48
    {
49
        return ['larsign'];
50
    }
51
52 2
    protected function configPath()
53
    {
54 2
        return __DIR__ . '/../config/larsign.php';
55
    }
56
}
57