| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 8 | public function __invoke(ResourceObject $ro, array $server) |
|
| 26 | { |
||
| 27 | if ($this->isNotModified($ro, $server)) { |
||
| 28 | $this->transfer304($ro); |
||
| 29 | 8 | ||
| 30 | 8 | return; |
|
| 31 | } |
||
| 32 | |||
| 33 | // render |
||
| 34 | 8 | if (! $ro->view) { |
|
| 35 | $ro->toString(); |
||
| 36 | } |
||
| 37 | 8 | ||
| 38 | 8 | // header |
|
| 39 | ($this->header)($ro, $server); |
||
| 40 | 9 | ||
| 41 | // code |
||
| 42 | 9 | http_response_code($ro->code); |
|
| 43 | 9 | ||
| 44 | 9 | // body |
|
| 45 | echo $ro->view; |
||
| 46 | } |
||
| 80 |