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   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setRootControllerNamespace() 0 5 1
A addRouteMiddleware() 0 8 4
B addMiddlewareGroups() 0 10 5
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