Total Complexity | 7 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Phone |
||
6 | { |
||
7 | private string $phoneNumber; |
||
8 | private ?string $phoneType = null; |
||
9 | |||
10 | 5 | public function __construct(string $phoneNumber) |
|
11 | { |
||
12 | 5 | $this->phoneNumber = $phoneNumber; |
|
13 | 5 | } |
|
14 | |||
15 | 1 | public function getPhoneNumber(): string |
|
16 | { |
||
17 | 1 | return $this->phoneNumber; |
|
18 | } |
||
19 | |||
20 | 1 | public function setPhoneNumber(string $phoneNumber): self |
|
21 | { |
||
22 | 1 | $this->phoneNumber = $phoneNumber; |
|
23 | |||
24 | 1 | return $this; |
|
25 | } |
||
26 | |||
27 | 1 | public function getPhoneType(): ?string |
|
28 | { |
||
29 | 1 | return $this->phoneType; |
|
30 | } |
||
31 | |||
32 | 2 | public function setPhoneType(?string $phoneType): self |
|
37 | } |
||
38 | |||
39 | 3 | public function toArray(): array |
|
50 | } |
||
51 | } |
||
52 |