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