| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function __invoke(ResourceObject $ro, array $server) |
||
| 32 | { |
||
| 33 | $isModifed = $this->condResponse->isModified($ro, $server); |
||
| 34 | 8 | $output = $isModifed ? $this->getOutput($ro, $server) : $this->condResponse->getOutput($ro->headers); |
|
| 35 | |||
| 36 | // header |
||
| 37 | 8 | foreach ($output->headers as $label => $value) { |
|
| 38 | 8 | header("{$label}: {$value}", false); |
|
| 39 | } |
||
| 40 | 9 | ||
| 41 | // code |
||
| 42 | 9 | http_response_code($output->code); |
|
| 43 | 9 | ||
| 44 | 9 | // body |
|
| 45 | echo $output->view; |
||
| 46 | } |
||
| 53 |