Total Complexity | 12 |
Total Lines | 77 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class User |
||
8 | { |
||
9 | private int $id; |
||
10 | private string $name; |
||
11 | private string $email; |
||
12 | private string $password; |
||
13 | private $createdAt; |
||
14 | private $updatedAt; |
||
15 | |||
16 | 4 | public function getId(): int |
|
17 | { |
||
18 | 4 | return $this->id; |
|
19 | } |
||
20 | |||
21 | 4 | public function getName(): string |
|
22 | { |
||
23 | 4 | return $this->name; |
|
24 | } |
||
25 | |||
26 | 4 | public function updateName(string $name): self |
|
31 | } |
||
32 | |||
33 | 4 | public function getEmail(): ?string |
|
34 | { |
||
35 | 4 | return $this->email; |
|
36 | } |
||
37 | |||
38 | 3 | public function updateEmail(?string $email): self |
|
39 | { |
||
40 | 3 | $this->email = $email; |
|
41 | |||
42 | 3 | return $this; |
|
43 | } |
||
44 | |||
45 | 2 | public function getPassword(): ?string |
|
48 | } |
||
49 | |||
50 | 3 | public function updatePassword(?string $password): self |
|
51 | { |
||
52 | 3 | $this->password = $password; |
|
53 | |||
54 | 3 | return $this; |
|
55 | } |
||
56 | |||
57 | 1 | public function getCreatedAt(): ?string |
|
58 | { |
||
59 | 1 | return $this->createdAt; |
|
60 | } |
||
61 | |||
62 | 2 | public function updateCreatedAt(?string $createdAt): self |
|
67 | } |
||
68 | |||
69 | 1 | public function getUpdatedAt(): ?string |
|
72 | } |
||
73 | |||
74 | 1 | public function updateUpdatedAt(?string $updatedAt): self |
|
75 | { |
||
76 | 1 | $this->updatedAt = $updatedAt; |
|
77 | |||
78 | 1 | return $this; |
|
79 | } |
||
80 | |||
81 | 2 | public function toJson(): object |
|
84 | } |
||
85 | } |
||
86 |