Total Complexity | 3 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
16 | final class ServerProcessor extends AbstractProcessor |
||
17 | { |
||
18 | public function process(ParsedHeaders $parsedHeaders): void |
||
19 | { |
||
20 | $observations = new ObservationCollection(); |
||
21 | |||
22 | if ($this->header()->leaksServerVersion()) { |
||
23 | $observations->addWarning(new ServerDisclosedVersionNumberWarning()); |
||
24 | } else { |
||
25 | $observations->addKudos(new ServerDoesNotLeakVersionKudos()); |
||
26 | } |
||
27 | |||
28 | $this->addObservations($observations); |
||
29 | } |
||
30 | |||
31 | private function header(): ServerHeaderResult |
||
34 | } |
||
35 | } |
||
36 |