Completed
Push — master ( 71431a...b18049 )
by ARCANEDEV
04:47
created

RouteServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 60%

Importance

Changes 6
Bugs 0 Features 0
Metric Value
dl 0
loc 39
ccs 3
cts 5
cp 0.6
rs 10
c 6
b 0
f 0
wmc 2
lcom 0
cbo 5

2 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 4 1
A mapAdminRoutes() 0 13 1
1
<?php namespace Arcanesoft\Foundation\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Foundation\Http\Routes;
5
use Illuminate\Contracts\Routing\Registrar as Router;
6
7
/**
8
 * Class     RouteServiceProvider
9
 *
10
 * @package  Arcanesoft\Foundation\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
    public function map(Router $router)
25
    {
26
        $this->mapAdminRoutes($router);
27
    }
28
29
    /* ------------------------------------------------------------------------------------------------
30
     |  Other Functions
31
     | ------------------------------------------------------------------------------------------------
32
     */
33
    /**
34
     * Map the admin routes.
35
     *
36
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
37
     */
38 12
    private function mapAdminRoutes(Router $router)
39
    {
40 12
        $attributes = array_merge($this->getFoundationRouteGroup(), [
0 ignored issues
show
Deprecated Code introduced by
The method Arcanesoft\Core\Bases\Ro...tFoundationRouteGroup() has been deprecated.

This method has been deprecated.

Loading history...
41 12
            'as'        => 'admin::foundation.',
42
            'namespace' => 'Arcanesoft\\Foundation\\Http\\Controllers\\Admin',
43
        ]);
44
45
        $router->group($attributes, function (Router $router) {
46
            Routes\Admin\DashboardRoute::register($router);
47
            Routes\Admin\SettingsRoutes::register($router);
48
            Routes\Admin\SystemRoutes::register($router);
49
        });
50
    }
51
}
52