SNI   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 73
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A setCertificateId() 0 5 1
A getCreatedAt() 0 3 1
A getCertificateId() 0 3 1
A getName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace CCT\Kong\Model;
6
7
class SNI
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $name;
13
14
    /**
15
     * @var string
16
     */
17
    protected $certificateId;
18
19
    /**
20
     * @var \DateTime
21
     */
22
    protected $createdAt;
23
24
    /**
25
     * Sets the SNI name to associate with the given certificate.
26
     *
27
     * @param string $name
28
     *
29
     * @return static
30
     */
31 4
    public function setName(string $name): self
32
    {
33 4
        $this->name = $name;
34
35 4
        return $this;
36
    }
37
38
    /**
39
     * Gets the SNI name given to the certificate.
40
     *
41
     * @return null|string
42
     */
43 4
    public function getName(): ?string
44
    {
45 4
        return $this->name;
46
    }
47
48
    /**
49
     * Sets the id (a UUID) of the certificate with which to associate the SNI hostname.
50
     *
51
     * @param string $certificateId
52
     *
53
     * @return static
54
     */
55 5
    public function setCertificateId(string $certificateId): self
56
    {
57 5
        $this->certificateId = $certificateId;
58
59 5
        return $this;
60
    }
61
62
    /**
63
     * Gets the id (a UUID) of the certificate with which to associate the SNI hostname.
64
     *
65
     * @return null|string
66
     */
67 2
    public function getCertificateId(): ?string
68
    {
69 2
        return $this->certificateId;
70
    }
71
72
    /**
73
     * Gets the date which the object was created.
74
     *
75
     * @return \DateTime|null
76
     */
77 1
    public function getCreatedAt(): ?\DateTime
78
    {
79 1
        return $this->createdAt;
80
    }
81
}
82