Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
12 | 1 | public function handleRequest(RequestInterface $request, callable $next) |
|
13 | { |
||
14 | 1 | $body = $request->getBody(); |
|
15 | |||
16 | 1 | if (!$request->hasHeader('Content-Length')) { |
|
17 | 1 | $request = $request->withAddedHeader('Content-Length', (string) $body->getSize()); |
|
18 | } |
||
19 | |||
20 | 1 | return $next($request); |
|
21 | } |
||
28 |