RouteServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 2
c 5
b 0
f 0
lcom 1
cbo 5
dl 0
loc 42
ccs 11
cts 11
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 6 1
A mapAdminRoutes() 0 9 1
1
<?php namespace Arcanesoft\Media\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Media\Http\Routes;
5
6
/**
7
 * Class     RouteServiceProvider
8
 *
9
 * @package  Arcanesoft\Media\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\\Media\\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 80
        $this->adminGroup(function () {
37 80
            $this->mapAdminRoutes();
38 80
        });
39 80
    }
40
41
    /**
42
     * Register the admin routes.
43
     */
44 80
    protected function mapAdminRoutes()
45
    {
46 80
        $this->prefix($this->config()->get('arcanesoft.media.route.prefix', 'media'))
47 80
             ->name('media.')
48 80
             ->group(function () {
49 80
                 Routes\Admin\MediaRoutes::register();
50 80
                 Routes\Admin\ApiRoutes::register();
51 80
             });
52
    }
53
}
54