Completed
Push — master ( 500503...dd30bb )
by Fumio
04:19
created

HttpKernel   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 85.71%

Importance

Changes 6
Bugs 2 Features 1
Metric Value
c 6
b 2
f 1
dl 0
loc 16
ccs 6
cts 7
cp 0.8571
rs 10
wmc 2
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 10 2
1
<?php
2
3
namespace LaravelPlus\Extension;
4
5
use Illuminate\Foundation\Http\Kernel;
6
use Jumilla\Addomnipot\Laravel\Environment as AddonEnvironment;
7
8
abstract class HttpKernel extends Kernel
9
{
10
    /**
11
     * Bootstrap the application for HTTP requests.
12
     */
13 1
    public function bootstrap()
14
    {
15 1
        parent::bootstrap();
16
17 1
        $this->middleware = array_merge($this->middleware, app(AddonEnvironment::class)->addonHttpMiddlewares());
18
19 1
        foreach (app(AddonEnvironment::class)->addonRouteMiddlewares() as $key => $middleware) {
20
            $this->router->middleware($key, $middleware);
21 1
        }
22 1
    }
23
}
24