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::addRouteMiddleware()   A
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
rs 9.2
cc 4
eloc 4
nc 3
nop 1
1
<?php
2
3
namespace Caffeinated\Modules\Providers;
4
5
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
6
7
abstract class RouteServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Set the root controller namespace for the application.
11
     */
12
    protected function setRootControllerNamespace()
13
    {
14
        // Intentionally left empty to prevent overwriting the
15
        // root controller namespace.
16
    }
17
18
    /**
19
     * Add middleware to the router.
20
     *
21
     * @param array $routeMiddleware
22
     */
23
    protected function addRouteMiddleware($routeMiddleware)
24
    {
25
        if (is_array($routeMiddleware) and count($routeMiddleware) > 0) {
26
            foreach ($routeMiddleware as $key => $middleware) {
27
                $this->middleware($key, $middleware);
28
            }
29
        }
30
    }
31
32
    /**
33
     * Add middleware groups to the router.
34
     *
35
     * @param array $middlewareGroups
36
     */
37
    protected function addMiddlewareGroups($middlewareGroups)
38
    {
39
        if (is_array($middlewareGroups) and count($middlewareGroups) > 0) {
40
            foreach ($middlewareGroups as $key => $groupMiddleware) {
41
                foreach ($groupMiddleware as $middleware) {
42
                    $this->pushMiddlewareToGroup($key, $middleware);
43
                }
44
            }
45
        }
46
    }
47
}
48