Total Complexity | 6 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class SecurityContext implements HttpSecurityContext |
||
8 | { |
||
9 | protected string $certificate; |
||
10 | protected string $privateKey; |
||
11 | |||
12 | 1 | public function getCertificate(): string |
|
13 | { |
||
14 | 1 | return $this->certificate; |
|
15 | } |
||
16 | |||
17 | 1 | public function getPrivateKey(): string |
|
18 | { |
||
19 | 1 | return $this->privateKey; |
|
20 | } |
||
21 | |||
22 | 1 | public function hasCertificate(): bool |
|
23 | { |
||
24 | 1 | return $this->certificate ?? false; |
|
|
|||
25 | } |
||
26 | |||
27 | 1 | public function hasPrivateKey(): bool |
|
28 | { |
||
29 | 1 | return $this->privateKey ?? false; |
|
30 | } |
||
31 | |||
32 | 1 | public function setCertificate(string $certificate): self |
|
33 | { |
||
34 | 1 | $this->certificate = $certificate; |
|
35 | |||
36 | 1 | return $this; |
|
37 | } |
||
38 | |||
39 | 1 | public function setPrivateKey(string $privateKey): self |
|
44 | } |
||
45 | } |
||
46 |