Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
18 | { |
||
19 | $contentType = $request->getHeaderLine(Header::CONTENT_TYPE); |
||
20 | |||
21 | if ($contentType && strpos(strtolower($contentType), 'application/json') !== false) { |
||
22 | $request = $request->withParsedBody( |
||
23 | $this->parse($request->getBody()->getContents()) |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | return $handler->handle($request); |
||
28 | } |
||
50 |