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.

CrudServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 60
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
B boot() 0 40 3
A register() 0 8 1
1
<?php
2
3
namespace Akibatech\Crud;
4
5
use Akibatech\Crud\Console\CrudControllerMakeCommand;
6
use Illuminate\Support\Facades\Blade;
7
use Illuminate\Support\ServiceProvider;
8
9
/**
10
 * Class CrudServiceProvider
11
 *
12
 * @package Akibatech\Crud
13
 */
14
class CrudServiceProvider extends ServiceProvider
15
{
16
    /**
17
     * @param   void
18
     * @return  void
19
     */
20
    public function boot()
21
    {
22
        if ($this->app->runningInConsole())
23
        {
24
            $this->commands([
25
                CrudControllerMakeCommand::class
26
            ]);
27
28
            $this->publishes([
29
                __DIR__ . '/../resources/lang/' => resource_path('lang/vendor/crud'),
30
            ], 'crud');
31
32
            $this->publishes([
33
                __DIR__ . '/../resources/views/' => resource_path('views/vendor/crud'),
34
            ], 'crud');
35
36
            $this->publishes([
37
                __DIR__ . '/../resources/assets/' => public_path('vendor/crud'),
38
            ], 'crud');
39
        }
40
41
        if ($this->app->runningUnitTests())
42
        {
43
            $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'crud');
44
            $this->loadTranslationsFrom(__DIR__ . '/../resources/lang/', 'crud');
45
        }
46
        else
47
        {
48
            $this->loadViewsFrom(resource_path('views/vendor/crud'), 'crud');
49
            $this->loadTranslationsFrom(resource_path('lang/vendor/crud'), 'crud');
50
        }
51
52
        Blade::directive('crudtable', function($expression) {
53
            return "<?php echo crud_table($expression); ?>";
54
        });
55
56
        Blade::directive('crudentry', function($expression) {
57
            return "<?php echo crud_entry($expression); ?>";
58
        });
59
    }
60
61
    /**
62
     * @param   void
63
     * @return  void
64
     */
65
    public function register()
66
    {
67
        $this->app->bind('Akibatech\Crud\Crud', Crud::class);
68
        $this->app->alias('Akibatech\Crud\Crud', 'crud');
69
70
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();
71
        $loader->alias('Crud', 'Akibatech\Crud\CrudFacade');
72
    }
73
}
74