Test Failed
Push — master ( e22c12...f8889b )
by Sergio
02:38
created

ServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 3 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: sergio.rodenas
5
 * Date: 2019-01-20
6
 * Time: 15:09
7
 */
8
9
namespace Rodenastyle\TestDoc;
10
11
12
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
13
use Illuminate\Contracts\Http\Kernel;
14
use Rodenastyle\TestDoc\Middleware\IncludeInSpecification;
15
16
class ServiceProvider extends BaseServiceProvider
17
{
18
	/**
19
	 * Perform post-registration booting of services.
20
	 *
21
	 * @return void
22
	 */
23
	public function boot(){
24
		if($this->app->runningUnitTests()){
25
			$this->app[Kernel::class]->pushMiddleware(IncludeInSpecification::class);
26
		}
27
	}
28
}