| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 8 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | #[Override] |
||
| 23 | public function __invoke(ResourceObject $ro, array $server): void |
||
| 24 | 8 | { |
|
| 25 | 8 | /** @var array{HTTP_IF_NONE_MATCH?: string} $server */ |
|
| 26 | $isModifed = $this->condResponse->isModified($ro, $server); |
||
| 27 | $output = $isModifed ? $this->getOutput($ro, $server) : $this->condResponse->getOutput($ro->headers); |
||
|
|
|||
| 28 | |||
| 29 | 8 | foreach ($output->headers as $label => $value) { |
|
| 30 | 8 | // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName |
|
| 31 | header("{$label}: {$value}", false); |
||
| 32 | } |
||
| 33 | |||
| 34 | 8 | // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName |
|
| 35 | http_response_code($output->code); |
||
| 36 | |||
| 37 | 8 | echo $output->view; |
|
| 38 | 8 | } |
|
| 48 |