RouteServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 10
Bugs 0 Features 0
Metric Value
wmc 3
eloc 9
dl 0
loc 45
ccs 10
cts 10
cp 1
rs 10
c 10
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerRouteBindings() 0 3 1
A map() 0 3 1
A mapAdminRoutes() 0 7 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
     |  Properties
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * The admin controller namespace for the application.
21
     *
22
     * @var string
23
     */
24
    protected $adminNamespace = 'Arcanesoft\\Foundation\\Http\\Controllers\\Admin';
25
26
    /* -----------------------------------------------------------------
27
     |  Main Methods
28
     | -----------------------------------------------------------------
29
     */
30
31
    /**
32
     * Register the route bindings.
33
     */
34 14
    protected function registerRouteBindings()
35
    {
36 14
        Routes\Admin\SystemRoutes::bindings();
37 14
    }
38
39
    /**
40
     * Define the routes for the application.
41
     */
42 14
    public function map()
43
    {
44 14
        $this->mapAdminRoutes();
45 14
    }
46
47
    /**
48
     * Map the admin routes.
49
     */
50
    private function mapAdminRoutes()
51
    {
52
        $this->adminGroup(function () {
53 14
            $this->name('foundation.')->group(function () {
54 14
                Routes\Admin\DashboardRoute::register();
55 14
                Routes\Admin\SettingsRoutes::register();
56 14
                Routes\Admin\SystemRoutes::register();
57 14
            });
58 14
        });
59 14
    }
60
}
61