GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( b25279...65338b )
by Aden
03:49
created

RouteServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 1
cbo 3
dl 0
loc 60
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
B map() 0 31 1
1
<?php
2
3
namespace LaravelFlare\Flare\Providers;
4
5
use Route;
6
use Illuminate\Routing\Router;
7
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
8
9
class RouteServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * This namespace is applied to the controller routes in your routes file.
13
     *
14
     * In addition, it is set as the URL generator's root namespace.
15
     *
16
     * @var string
17
     */
18
    protected $namespace = '\LaravelFlare\Flare\Http\Controllers';
19
20
    /**
21
     * Define your route model bindings, pattern filters, etc.
22
     *
23
     * @param \Illuminate\Routing\Router $router
24
     */
25
    public function boot(Router $router)
26
    {
27
        //
28
29
        parent::boot($router);
30
    }
31
32
    /**
33
     * Define the routes for the application.
34
     *
35
     * @param \Illuminate\Routing\Router $router
36
     */
37
    public function map(Router $router)
38
    {
39
        $router->middleware('flareauthenticate', \LaravelFlare\Flare\Http\Middleware\FlareAuthenticate::class);
40
        $router->middleware('checkmodelfound', \LaravelFlare\Flare\Http\Middleware\CheckModelFound::class);
41
        $router->middleware('checkpermissions', \LaravelFlare\Flare\Http\Middleware\CheckPermissions::class);
42
43
        $router->middlewareGroup('flarebase', [
44
                \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
45
                \Illuminate\Session\Middleware\StartSession::class,
46
                \Illuminate\View\Middleware\ShareErrorsFromSession::class,
47
                \App\Http\Middleware\VerifyCsrfToken::class,
48
                \App\Http\Middleware\EncryptCookies::class,
49
            ]);
50
51
        $router->middlewareGroup('flare', [
52
                'flarebase',
53
                'flareauthenticate',
54
                'checkpermissions',
55
            ]);
56
57
        $router->group(['prefix' => \Flare::config('admin_url'), 'namespace' => $this->namespace, 'middleware' => ['flare']], function ($router) {
0 ignored issues
show
Unused Code introduced by
The parameter $router is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
58
            (new \LaravelFlare\Flare\Admin\AdminManager())->registerRoutes();
59
        });
60
61
        $router->group(['prefix' => \Flare::config('admin_url'), 'middleware' => ['flarebase']], function ($router) {
62
63
            // Needs replacing with implicit routes, as controller is deprecated as of 5.2 and will be removed in 5.3
64
            $router->controller('/', $this->namespace . '\AdminController');
65
66
        });
67
    }
68
}
69