ShieldServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

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