RouteServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
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 41
ccs 10
cts 10
cp 1
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 6 1
A mapAdminRoutes() 0 8 1
1
<?php namespace Arcanesoft\Tracker\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Tracker\Http\Routes;
5
6
/**
7
 * Class     RouteServiceProvider
8
 *
9
 * @package  Arcanesoft\Tracker\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\\Tracker\\Http\\Controllers\\Admin';
25
26
    /* -----------------------------------------------------------------
27
     |  Main Methods
28
     | -----------------------------------------------------------------
29
     */
30
31
    /**
32
     * Define the routes for the application.
33
     */
34
    public function map()
35
    {
36 4
        $this->adminGroup(function () {
37 4
            $this->mapAdminRoutes();
38 4
        });
39 4
    }
40
41
    /**
42
     * Register the admin routes.
43
     */
44 4
    private function mapAdminRoutes()
45
    {
46 4
        $this->name('tracker.')
47 4
             ->prefix($this->config()->get('arcanesoft.tracker.route.prefix', 'tracker'))
48 4
             ->group(function () {
49 4
                 Routes\Admin\TrackerRoutes::register();
50 4
             });
51
    }
52
}
53