| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 35 | public function onKernelRequest(GetResponseEvent $event) | ||
| 36 |     { | ||
| 37 | $request = $event->getRequest(); | ||
| 38 | |||
| 39 |         if ($request->headers->has('Content-Type')) { | ||
| 40 |             $contentType = $request->headers->get('Content-Type'); | ||
| 41 | |||
| 42 |             if (in_array($contentType, $this->jsonContentTypes)) { | ||
| 43 | $data = json_decode($request->getContent(), true); | ||
| 44 | |||
| 45 |                 if (is_array($data)) { | ||
| 46 | $request->request = new ParameterBag($data); | ||
| 47 | } | ||
| 48 | } | ||
| 49 | } | ||
| 50 | } | ||
| 51 | } | ||
| 52 |