RouteListServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 94.12%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 40
ccs 16
cts 17
cp 0.9412
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 22 2
A register() 0 4 1
1
<?php
2
3
namespace Bmatovu\RouteList;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class RouteListServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14 1
    public function boot()
15
    {
16 1
        if (config('route-list.debug') != config('app.debug')) {
17
            return;
18
        }
19
20 1
        $this->loadViewComponentsAs('route-list', [
21 1
            View\Components\Table::class,
22
        ]);
23
24 1
        $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
25
26 1
        $this->loadViewsFrom(__DIR__.'/../resources/views', 'route-list');
27
28 1
        $this->publishes([
29 1
            __DIR__.'/../config/route-list.php' => config_path('route-list.php'),
30 1
        ], 'config');
31
32 1
        $this->publishes([
33 1
            __DIR__.'/../public/vendor/route-list' => public_path('vendor/route-list'),
34 1
        ], 'public');
35 1
    }
36
37
    /**
38
     * Register the application services.
39
     *
40
     * @return void
41
     */
42 1
    public function register()
43
    {
44 1
        $this->mergeConfigFrom(__DIR__.'/../config/route-list.php', 'route-list');
45 1
    }
46
}
47