| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | #[Route("/api/session", name: "session_api")] |
||
| 25 | public function sessionJson( |
||
| 26 | SessionInterface $session |
||
| 27 | ): Response { |
||
| 28 | $data = [ |
||
| 29 | 'session' => $session->all() |
||
| 30 | ]; |
||
| 31 | |||
| 32 | $response = new JsonResponse($data); |
||
| 33 | $response->setEncodingOptions( |
||
| 34 | $response->getEncodingOptions() | JSON_PRETTY_PRINT |
||
| 35 | ); |
||
| 36 | return $response; |
||
| 37 | } |
||
| 48 |