| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function process(ServerRequestInterface $request, DelegateInterface $delegate) |
||
| 28 | { |
||
| 29 | $headers = $request->getHeader('content-type'); |
||
| 30 | foreach ($headers as $header) { |
||
| 31 | if ('application/x-www-form-urlencoded' === substr($header, 0, 33)) { |
||
| 32 | $request->getBody()->rewind(); |
||
| 33 | $body = $request->getBody()->getContents(); |
||
| 34 | if (true === parse_str($body, $parsed)) { |
||
| 35 | $request = $request->withParsedBody($parsed); |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | return $delegate->process($request); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |