Total Complexity | 8 |
Total Lines | 68 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class Comment |
||
11 | { |
||
12 | /** |
||
13 | * @MongoDB\Field(type="string") |
||
14 | */ |
||
15 | private $user; |
||
16 | |||
17 | /** |
||
18 | * @MongoDB\Field(type="string") |
||
19 | */ |
||
20 | private $body; |
||
21 | |||
22 | /** |
||
23 | * @MongoDB\Field(type="date") |
||
24 | */ |
||
25 | private $createdAt; |
||
26 | |||
27 | /** |
||
28 | * @MongoDB\Field(type="boolean") |
||
29 | */ |
||
30 | private $approved = false; |
||
31 | |||
32 | public function __construct(string $user, string $body) |
||
37 | } |
||
38 | |||
39 | public function getUser(): string |
||
40 | { |
||
41 | return $this->user; |
||
42 | } |
||
43 | |||
44 | public function getBody(): ?string |
||
45 | { |
||
46 | return $this->body; |
||
47 | } |
||
48 | |||
49 | public function setBody(string $body): self |
||
50 | { |
||
51 | $this->body = $body; |
||
52 | |||
53 | return $this; |
||
54 | } |
||
55 | |||
56 | public function getCreatedAt(): ?\DateTimeInterface |
||
57 | { |
||
58 | return $this->createdAt; |
||
59 | } |
||
60 | |||
61 | public function setCreatedAt(\DateTimeInterface $createdAt): self |
||
62 | { |
||
63 | $this->createdAt = $createdAt; |
||
64 | |||
65 | return $this; |
||
66 | } |
||
67 | |||
68 | public function getApproved(): bool |
||
71 | } |
||
72 | |||
73 | public function setApproved(bool $approved): self |
||
74 | { |
||
75 | $this->approved = $approved; |
||
78 | } |
||
79 | } |
||
80 |