Completed
Push — dev ( 4f11ce...5d65d1 )
by Alies
06:00 queued 01:47
created

RouteServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 44
c 0
b 0
f 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A mapWidgetRoutes() 0 6 1
A mapDashboardRoutes() 0 11 1
A map() 0 4 1
1
<?php
2
3
namespace Diglabby\Doika\Providers;
4
5
use App\Providers\RouteServiceProvider as BasicRouteServiceProvider;
6
use Illuminate\Support\Facades\Route;
7
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
0 ignored issues
show
Bug introduced by
The type Mcamara\LaravelLocalizat...des\LaravelLocalization was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
final class RouteServiceProvider extends BasicRouteServiceProvider
10
{
11
    /**
12
     * This namespace is applied to your controller routes.
13
     *
14
     * In addition, it is set as the URL generator's root namespace.
15
     *
16
     * @var string
17
     */
18
    protected $namespace = 'Diglabby\Doika\Http\Controllers';
19
20
    /** @var string */
21
    protected $laravelNamespace = 'App\Http\Controllers';
22
23
    /**
24
     * Define the routes for the application.
25
     *
26
     * @return void
27
     */
28
    public function map()
29
    {
30
        $this->mapWidgetRoutes();
31
        $this->mapDashboardRoutes();
32
    }
33
34
    protected function mapWidgetRoutes()
35
    {
36
        Route::middleware('web')
37
            ->prefix('doika')
38
            ->namespace($this->namespace)
39
            ->group(base_path('routes/widget.php'));
40
    }
41
42
    protected function mapDashboardRoutes()
43
    {
44
        Route::middleware(['web'])
45
            ->prefix('doika/')
46
            ->namespace($this->laravelNamespace)
47
            ->group(base_path('routes/auth.php'));
48
49
        Route::middleware(['web', 'auth'])
50
            ->prefix('doika/dashboard/')
51
            ->namespace($this->namespace)
52
            ->group(base_path('routes/dashboard.php'));
53
    }
54
}
55