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