Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function emit(ResponseInterface $response, bool $withoutBody = false) |
||
33 | { |
||
34 | $this->response->status($response->getStatusCode(), $response->getReasonPhrase()); |
||
35 | |||
36 | foreach ($response->getHeaders() as $key => $value) { |
||
37 | $this->response->header($key, $value); |
||
38 | } |
||
39 | |||
40 | if (!$withoutBody) { |
||
41 | $this->emitBody($response->getBody()); |
||
42 | } |
||
43 | |||
44 | $this->response->end(); |
||
45 | } |
||
58 |