Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function onKernelRequest(GetResponseEvent $event): void |
||
34 | { |
||
35 | $request = $event->getRequest(); |
||
36 | |||
37 | if ($request->headers->has('Content-Type') && \in_array($request->headers->get('Content-Type'), self::JSON_CONTENT_TYPES, true)) { |
||
38 | $data = \json_decode($request->getContent(), true); |
||
39 | |||
40 | if (\is_array($data)) { |
||
41 | $request->request = new ParameterBag($data); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 |