Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
35 | public function getMissingHeaders(): array |
||
36 | { |
||
37 | $foundHeaders = []; |
||
38 | |||
39 | foreach ($this->getObservations() as $observation) { |
||
40 | $foundHeaders[] = $observation->getHeaderName(); |
||
41 | } |
||
42 | |||
43 | $excludeFromSuggestions = [ |
||
44 | SecurityHeader::EXPECT_CT, |
||
45 | SecurityHeader::SERVER, |
||
46 | SecurityHeader::SET_COOKIE, |
||
47 | SecurityHeader::X_POWERED_BY, |
||
48 | ]; |
||
49 | |||
50 | return array_diff($this->securityHeader->all(), $foundHeaders, $excludeFromSuggestions); |
||
51 | } |
||
58 |