Completed
Push — master ( 389031...756eed )
by ARCANEDEV
9s
created

RouteServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 38
ccs 12
cts 12
cp 1
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 4 1
A mapAdminRoutes() 0 12 1
1
<?php namespace Arcanesoft\Seo\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Seo\Http\Routes;
5
use Illuminate\Contracts\Routing\Registrar as Router;
6
7
/**
8
 * Class     RouteServiceProvider
9
 *
10
 * @package  Arcanesoft\Seo\Providers
11
 * @author   ARCANEDEV <[email protected]>
12
 */
13
class RouteServiceProvider extends ServiceProvider
14
{
15
    /* ------------------------------------------------------------------------------------------------
16
     |  Main Functions
17
     | ------------------------------------------------------------------------------------------------
18
     */
19
    /**
20
     * Define the routes for the application.
21
     *
22
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
23
     */
24 16
    public function map(Router $router)
25
    {
26 16
        $this->mapAdminRoutes($router);
27 16
    }
28
29
    /* ------------------------------------------------------------------------------------------------
30
     |  Routes
31
     | ------------------------------------------------------------------------------------------------
32
     */
33
    /**
34
     * Map the admin routes.
35
     *
36
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
37
     */
38 16
    private function mapAdminRoutes(Router $router)
39
    {
40 16
        $attributes = $this->getAdminAttributes(
41 16
            'seo.',
42 16
            'Arcanesoft\\Seo\\Http\\Controllers\\Admin',
43 16
            $this->config()->get('arcanesoft.seo.route.prefix', 'seo')
44
        );
45
46 16
        $router->group($attributes, function ($router) {
47 16
            Routes\Admin\SeoRoutes::register($router);
48 16
        });
49 16
    }
50
}
51