Conditions | 5 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
19 | public function handle($request, Closure $next) |
||
20 | { |
||
21 | $response = $next($request); |
||
22 | |||
23 | if ( |
||
24 | $response instanceof JsonResponse && |
||
25 | app()->bound('debugbar') && |
||
|
|||
26 | app('debugbar')->isEnabled() && |
||
27 | is_object($response->getData()) |
||
28 | ) { |
||
29 | $response->setData($response->getData(true) + [ |
||
30 | '_debugbar' => app('debugbar')->getData(), |
||
31 | ]); |
||
32 | } |
||
33 | |||
34 | return $response; |
||
35 | } |
||
37 |