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.

ServiceProvider::addMiddleware()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
rs 9.4285
cc 3
eloc 7
nc 3
nop 1
1
<?php
2
3
namespace Caffeinated\Modules\Support;
4
5
use Illuminate\Support\ServiceProvider as IlluminateServiceProvider;
6
7
class ServiceProvider extends IlluminateServiceProvider
8
{
9
    /**
10
     * Register bindings in the container.
11
     *
12
     * @return void
13
     */
14
    public function register()
15
    {
16
        // Intentionally left blank.
17
    }
18
19
    /**
20
     * Register any additional module middleware.
21
     *
22
     * @param  array|string  $middleware
23
	 * @return void
24
     */
25
	protected function addMiddleware($middleware)
26
	{
27
		$kernel = $this->app['Illuminate\Contracts\Http\Kernel'];
28
29
		if (is_array($middleware)) {
30
			foreach ($middleware as $ware) {
31
				$kernel->pushMiddleware($ware);
32
			}
33
		} else {
34
			$kernel->pushMiddleware($middleware);
35
		}
36
	}
37
}
38