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