| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 35 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface |
||
| 36 | { |
||
| 37 | $parsedBody = $request->getParsedBody(); |
||
| 38 | |||
| 39 | if (is_array($parsedBody)) { |
||
| 40 | array_walk_recursive($parsedBody, function (&$value) { |
||
| 41 | if (is_string($value)) { |
||
| 42 | $value = trim($value); |
||
| 43 | } |
||
| 44 | }); |
||
| 45 | |||
| 46 | $request = $request->withParsedBody($parsedBody); |
||
| 47 | } |
||
| 48 | |||
| 49 | return $handler->handle($request); |
||
| 50 | } |
||
| 52 |