Total Complexity | 10 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class Note |
||
8 | { |
||
9 | private int $id; |
||
10 | private string $name; |
||
11 | private ?string $description; |
||
12 | private $createdAt; |
||
13 | private $updatedAt; |
||
14 | |||
15 | 3 | public function getId(): int |
|
16 | { |
||
17 | 3 | return $this->id; |
|
18 | } |
||
19 | |||
20 | 3 | public function getName(): string |
|
21 | { |
||
22 | 3 | return $this->name; |
|
23 | } |
||
24 | |||
25 | 2 | public function updateName(string $name): self |
|
30 | } |
||
31 | |||
32 | 3 | public function getDescription(): ?string |
|
35 | } |
||
36 | |||
37 | 2 | public function updateDescription(?string $description): self |
|
38 | { |
||
39 | 2 | $this->description = $description; |
|
40 | |||
41 | 2 | return $this; |
|
42 | } |
||
43 | |||
44 | 1 | public function getCreatedAt(): ?string |
|
47 | } |
||
48 | |||
49 | 1 | public function updateCreatedAt(?string $createdAt): self |
|
50 | { |
||
51 | 1 | $this->createdAt = $createdAt; |
|
52 | |||
53 | 1 | return $this; |
|
54 | } |
||
55 | |||
56 | 2 | public function getUpdatedAt(): ?string |
|
57 | { |
||
58 | 2 | return $this->updatedAt; |
|
59 | } |
||
60 | |||
61 | 2 | public function updateUpdatedAt(?string $updatedAt): self |
|
62 | { |
||
63 | 2 | $this->updatedAt = $updatedAt; |
|
64 | |||
65 | 2 | return $this; |
|
66 | } |
||
67 | |||
68 | 3 | public function toJson(): object |
|
71 | } |
||
72 | } |
||
73 |