Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
20 | public function process(ParsedHeaders $parsedHeaders): void |
||
21 | { |
||
22 | $observations = new ObservationCollection(); |
||
23 | |||
24 | if (!$this->header()->hasSecureMaxAge()) { |
||
25 | $observations->addWarning(new StrictTransportSecurityWithInsufficientMaxAgeWarning()); |
||
26 | } else { |
||
27 | $observations->addKudos(new StrictTransportSecurityWithSufficientMaxAgeKudos()); |
||
28 | } |
||
29 | |||
30 | if (!$this->header()->hasFlagIncludeSubDomains()) { |
||
31 | $observations->addInfo(new StrictTransportSecurityWithMissingIncludeSubDomainsFlagInfo()); |
||
32 | } else { |
||
33 | $observations->addKudos(new StrictTransportSecurityWithIncludeSubDomainsFlagKudos()); |
||
34 | } |
||
35 | |||
36 | $this->addObservations($observations); |
||
37 | } |
||
44 |