IncludeInSpecification   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 3 1
A terminate() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: sergio.rodenas
5
 * Date: 2019-01-30
6
 * Time: 08:13
7
 */
8
9
namespace Rodenastyle\TestDoc\Middleware;
10
11
12
use Closure;
13
use Illuminate\Http\Request;
0 ignored issues
show
Bug introduced by
The type Illuminate\Http\Request was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use Rodenastyle\TestDoc\TestDocGenerator;
15
16
class IncludeInSpecification
17
{
18
	private $generator;
19
20
	public function __construct()
21
	{
22
		$this->generator = new TestDocGenerator;
23
	}
24
25
	public function handle(Request $request, Closure $next)
26
	{
27
		return $next($request);
28
	}
29
30
	public function terminate(Request $request, $response)
31
	{
32
		$this->generator->registerEndpoint($request, $response);
33
	}
34
}