RouteServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 7 2
1
<?php namespace Arcanedev\LaravelSeo\Providers;
2
3
use Arcanedev\LaravelSeo\Http\Middleware\RedirectsMissingPages;
4
use Arcanedev\LaravelSeo\Seo;
5
use Arcanedev\Support\Providers\RouteServiceProvider as ServiceProvider;
6
use Illuminate\Contracts\Http\Kernel as HttpKernel;
7
8
/**
9
 * Class     RouteServiceProvider
10
 *
11
 * @package  Arcanedev\LaravelSeo\Providers
12
 * @author   ARCANEDEV <[email protected]>
13
 */
14
class RouteServiceProvider extends ServiceProvider
15
{
16
    /* -----------------------------------------------------------------
17
     |  Main Methods
18
     | -----------------------------------------------------------------
19
     */
20
21
    /**
22
     * Bootstrap any application services.
23
     */
24 58
    public function boot()
25
    {
26 58
        if (Seo::getConfig('redirector.enabled', false))
27 58
            $this->app->make(HttpKernel::class)->pushMiddleware(RedirectsMissingPages::class);
28
29 58
        parent::boot();
30 58
    }
31
}
32