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 ( dc1691...d7005b )
by Shea
05:23
created

RouteServiceProvider   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 3
Bugs 2 Features 1
Metric Value
wmc 10
c 3
b 2
f 1
lcom 0
cbo 0
dl 0
loc 45
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
	 * @return void
13
	 */
14
	protected function setRootControllerNamespace()
15
	{
16
		// Intentionally left empty to prevent overwriting the
17
		// root controller namespace.
18
	}
19
20
	/**
21
	 * Add middleware to the router.
22
	 *
23
	 * @param array  $routeMiddleware
24
	 * @return void
25
	 */
26
	protected function addRouteMiddleware($routeMiddleware)
27
	{
28
		if (is_array($routeMiddleware) and count($routeMiddleware) > 0) {
29
			foreach ($routeMiddleware as $key => $middleware) {
30
				$this->middleware($key, $middleware);
31
	        }
32
		}
33
	}
34
35
	/**
36
	 * Add middleware groups to the router.
37
	 *
38
	 * @param  array  $middlewareGroups
39
	 * @return void
40
	 */
41
	protected function addMiddlewareGroups($middlewareGroups)
42
	{
43
		if (is_array($middlewareGroups) and count($middlewareGroups) > 0) {
44
			foreach ($middlewareGroups as $key => $groupMiddleware) {
45
				foreach ($groupMiddleware as $middleware) {
46
					$this->pushMiddlewareToGroup($key, $middleware);
47
				}
48
	        }
49
		}
50
	}
51
}
52