ProtocolServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerMiddleware() 0 4 1
A boot() 0 3 1
1
<?php
2
3
namespace Bavix\Providers;
4
5
use Bavix\Middleware\HttpsProtocol;
6
use Illuminate\Support\ServiceProvider;
7
use Illuminate\Contracts\Http\Kernel;
8
9
class ProtocolServiceProvider extends ServiceProvider
10
{
11
12
    public function boot()
13
    {
14
        $this->registerMiddleware(HttpsProtocol::class);
15
    }
16
17
18
    /**
19
     * Register the Debugbar Middleware
20
     *
21
     * @param  string $middleware
22
     */
23
    protected function registerMiddleware($middleware)
24
    {
25
        $kernel = $this->app[Kernel::class];
26
        $kernel->pushMiddleware($middleware);
27
    }
28
29
}
30