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.

RouteServiceProvider::map()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace App\Providers;
4
5
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
6
use Illuminate\Support\Facades\Route;
7
8
class RouteServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * This namespace is applied to your controller routes.
12
     *
13
     * In addition, it is set as the URL generator's root namespace.
14
     *
15
     * @var string
16
     */
17
    protected $namespace = 'App\Http\Controllers';
18
19
    /**
20
     * Define your route model bindings, pattern filters, etc.
21
     *
22
     * @return void
23
     */
24
    public function boot()
25
    {
26
        //
27
28
        parent::boot();
29
    }
30
31
    /**
32
     * Define the routes for the application.
33
     *
34
     * @return void
35
     */
36
    public function map()
37
    {
38
        $this->mapApiRoutes();
39
40
        $this->mapWebRoutes();
41
42
        //
43
    }
44
45
    /**
46
     * Define the "web" routes for the application.
47
     *
48
     * These routes all receive session state, CSRF protection, etc.
49
     *
50
     * @return void
51
     */
52
    protected function mapWebRoutes()
53
    {
54
        Route::group([
55
            'middleware' => 'web',
56
            'namespace'  => $this->namespace,
57
        ], function ($router) {
0 ignored issues
show
Unused Code introduced by
The call to Route::group() has too many arguments starting with function ($router) { ...th('routes/web.php'); }.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
58
            require base_path('routes/web.php');
59
        });
60
    }
61
62
    /**
63
     * Define the "api" routes for the application.
64
     *
65
     * These routes are typically stateless.
66
     *
67
     * @return void
68
     */
69
    protected function mapApiRoutes()
70
    {
71
        Route::group([
72
            'middleware' => 'api',
73
            'namespace'  => $this->namespace.'\Api',
74
        ], function ($router) {
0 ignored issues
show
Unused Code introduced by
The call to Route::group() has too many arguments starting with function ($router) { ...th('routes/api.php'); }.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
75
            require base_path('routes/api.php');
76
        });
77
    }
78
}
79