| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | protected function writeHeader(HttpResponse $response) |
||
| 22 | { |
||
| 23 | echo "HTTP/1.1 " . $response->getResponseCode() . "\r\n"; |
||
| 24 | echo "Content-Type: " . $this->getContentType() . "\r\n"; |
||
| 25 | |||
| 26 | foreach ($response->getHeaders() as $header) { |
||
| 27 | if (is_array($header)) { |
||
| 28 | echo "${header[0]}: ${header[1]}\n"; |
||
| 29 | continue; |
||
| 30 | } |
||
| 31 | echo "$header\n"; |
||
| 32 | } |
||
| 33 | |||
| 34 | echo "\r\n"; |
||
| 35 | } |
||
| 77 |