Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | 3 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
52 | { |
||
53 | 3 | $response = $handler->handle($request); |
|
54 | 3 | $stream = $response->getBody(); |
|
55 | |||
56 | 3 | if ($stream->isSeekable()) { |
|
57 | 1 | $stream->rewind(); |
|
58 | } |
||
59 | |||
60 | 3 | while (!$stream->eof()) { |
|
61 | 3 | echo $stream->read($this->bufferSize); |
|
62 | } |
||
63 | |||
64 | 3 | return $response; |
|
65 | } |
||
67 |