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