Completed
Push — master ( 1ba115...baab82 )
by Nico
02:35
created

XXSSProtectionHeaderResult::isBlocking()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * @license  http://opensource.org/licenses/mit-license.php MIT
5
 * @link     https://github.com/nicoSWD
6
 * @author   Nicolas Oelgart <[email protected]>
7
 */
8
namespace nicoSWD\SecHeaderCheck\Domain\Result\Result;
9
10
use nicoSWD\SecHeaderCheck\Domain\Result\AbstractParsedHeader;
11
12
final class XXSSProtectionHeaderResult extends AbstractParsedHeader
13
{
14
    private $protectionIsOn = false;
15
    private $isBlocking = false;
16
    private $hasReportUri = false;
17
18
    public function isSecure(): bool
19
    {
20
        return $this->protectionIsOn() && $this->isBlocking();
21
    }
22
23 8
    public function protectionIsOn(): bool
24
    {
25 8
        return $this->protectionIsOn;
26
    }
27
28 8
    public function setProtectionIsOn(bool $protectionIsOn): self
29
    {
30 8
        $this->protectionIsOn = $protectionIsOn;
31
32 8
        return $this;
33
    }
34
35 8
    public function isBlocking(): bool
36
    {
37 8
        return $this->isBlocking;
38
    }
39
40 8
    public function setIsBlocking(bool $isBlocking): self
41
    {
42 8
        $this->isBlocking = $isBlocking;
43
44 8
        return $this;
45
    }
46
47 8
    public function hasReportUri(): bool
48
    {
49 8
        return $this->hasReportUri;
50
    }
51
52 8
    public function setHasReportUri(bool $hasReportUri): self
53
    {
54 8
        $this->hasReportUri = $hasReportUri;
55
56 8
        return $this;
57
    }
58
}
59