Completed
Pull Request — master (#8)
by ARCANEDEV
05:19
created

RouteServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

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

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
6
/**
7
 * Class     RouteServiceProvider
8
 *
9
 * @package  Arcanesoft\Foundation\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class RouteServiceProvider extends ServiceProvider
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * Define the routes for the application.
20
     */
21 21
    public function map()
22
    {
23 21
        $this->mapAdminRoutes();
24 21
    }
25
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Other Functions
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * Map the admin routes.
32
     */
33 21
    private function mapAdminRoutes()
34
    {
35 21
        $attributes = $this->getAdminAttributes(
36 21
            'foundation.',
37 21
            'Arcanesoft\\Foundation\\Http\\Controllers\\Admin'
38
        );
39
40 21
        $this->group($attributes, function () {
41 21
            Routes\Admin\DashboardRoute::register();
42 21
            Routes\Admin\SettingsRoutes::register();
43 21
            Routes\Admin\SystemRoutes::register();
44 21
        });
45 21
    }
46
}
47