Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
9 | class LaravelDatadogMiddleware |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @param $request |
||
14 | * @param Closure $next |
||
15 | * @return \Illuminate\Http\RedirectResponse |
||
16 | */ |
||
17 | public function handle($request, Closure $next) |
||
18 | { |
||
19 | $startTime = microtime(true); |
||
20 | |||
21 | $response = $next($request); |
||
22 | |||
23 | if (config('datadog-helper.enabled', false)) { |
||
24 | static::logDuration($request, $response, $startTime); |
||
25 | } |
||
26 | |||
27 | return $response; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Logs the duration of a specific request through the application |
||
32 | * |
||
33 | * @param Request $request |
||
34 | * @param Response $response |
||
35 | * @param double $startTime |
||
36 | */ |
||
37 | protected static function logDuration(Request $request, Response $response, $startTime) |
||
47 | } |
||
48 | |||
50 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths