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