ShieldServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 19
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 1
A register() 0 7 1
1
<?php
2
3
namespace Clarkeash\Shield\Providers;
4
5
use Clarkeash\Shield\Http\Middleware\Shield;
6
use Illuminate\Support\ServiceProvider;
7
8
class ShieldServiceProvider extends ServiceProvider
9
{
10
    public function boot()
11
    {
12
        $this->publishes([
13
            __DIR__ . '/../../resources/config/shield.php' => config_path('shield.php'),
14
        ], 'config');
15
16
        $this->app['router']->aliasMiddleware('shield', Shield::class);
17
    }
18
19
    public function register()
20
    {
21
        $this->mergeConfigFrom(
22
            __DIR__ . '/../../resources/config/shield.php',
23
            'shield'
24
        );
25
    }
26
}
27