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.

RatingServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 14
c 1
b 0
f 0
dl 0
loc 67
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 18 2
A bootForConsole() 0 6 1
A register() 0 3 1
1
<?php
2
3
namespace Compubel\Rating;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class RatingServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Perform post-registration booting of services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        // this->loadMigrationsFrom(__DIR__.'/../database/migrations');
17
        // $this->loadRoutesFrom(__DIR__.'/routes.php');
18
19
        $timestamp = date('Y_m_d_His');
20
21
        $this->publishes([
22
            __DIR__.'/../database/migrations/2019_03_08_000000_create_rating_table.php' => database_path('/migrations/'.$timestamp.'_create_rating_table.php'),
23
        ], 'migrations');
24
25
        $this->publishes([
26
            __DIR__.'/../config/rating.php' => config_path('rating.php'),
27
        ], 'config');
28
29
        // Publishing is only necessary when using the CLI.
30
        if ($this->app->runningInConsole()) {
31
            $this->bootForConsole();
32
        }
33
    }
34
35
    /**
36
     * Register any package services.
37
     *
38
     * @return void
39
     */
40
    public function register()
41
    {
42
        $this->mergeConfigFrom(__DIR__.'/../config/rating.php', 'rating');
43
44
        // Register the service the package provides.
45
//        $this->app->singleton('laravel-rating', function ($app) {
46
//            return new laravel-rating;
47
//        });
48
//	    $this->app->singleton(Rating::class, function () {
49
//		    return new Rating();
50
//	    });
51
    }
52
53
    /**
54
     * Get the services provided by the provider.
55
     *
56
     * @return array
57
     */
58
//    public function provides()
59
//    {
60
//        return ['laravel-rating'];
61
//    }
62
63
    /**
64
     * Console-specific booting.
65
     *
66
     * @return void
67
     */
68
    protected function bootForConsole()
69
    {
70
        // Publishing the configuration file.
71
        $this->publishes([
72
            __DIR__.'/../config/rating.php' => config_path('rating.php'),
73
        ], 'rating.config');
74
75
        // Registering package commands.
76
        // $this->commands([]);
77
    }
78
}
79