| Total Complexity | 9 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Coverage | 78.26% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Member |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @ORM\Id |
||
| 18 | * @ORM\ManyToOne(targetEntity="App\Entity\Community\Community") |
||
| 19 | */ |
||
| 20 | protected $community; |
||
| 21 | /** |
||
| 22 | * @ORM\Id |
||
| 23 | * @ORM\ManyToOne(targetEntity="App\Entity\User\User") |
||
| 24 | */ |
||
| 25 | protected $user; |
||
| 26 | /** |
||
| 27 | * @ORM\Column(type="boolean") |
||
| 28 | */ |
||
| 29 | protected $isLead; |
||
| 30 | /** |
||
| 31 | * @ORM\Column(type="datetime") |
||
| 32 | */ |
||
| 33 | protected $joinedAt; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @ORM\PrePersist() |
||
| 37 | */ |
||
| 38 | 1 | public function prePersist() |
|
| 39 | { |
||
| 40 | 1 | $this->joinedAt = new \DateTime(); |
|
| 41 | 1 | } |
|
| 42 | |||
| 43 | 5 | public function setCommunity(Community $community): Member |
|
| 48 | } |
||
| 49 | |||
| 50 | 2 | public function getCommunity(): Community |
|
| 51 | { |
||
| 52 | 2 | return $this->community; |
|
| 53 | } |
||
| 54 | |||
| 55 | 5 | public function setUser(User $user): Member |
|
| 56 | { |
||
| 57 | 5 | $this->user = $user; |
|
| 58 | |||
| 59 | 5 | return $this; |
|
| 60 | } |
||
| 61 | |||
| 62 | 2 | public function getUser(): User |
|
| 63 | { |
||
| 64 | 2 | return $this->user; |
|
| 65 | } |
||
| 66 | |||
| 67 | 3 | public function setIsLead(bool $isLead): Member |
|
| 72 | } |
||
| 73 | |||
| 74 | 2 | public function getIsLead(): bool |
|
| 75 | { |
||
| 76 | 2 | return $this->isLead; |
|
| 77 | } |
||
| 78 | |||
| 79 | public function setJoinedAt(\DateTime $joinedAt): Member |
||
| 84 | } |
||
| 85 | |||
| 86 | public function getJoinedAt(): \DateTime |
||
| 87 | { |
||
| 88 | return $this->joinedAt; |
||
| 89 | } |
||
| 90 | } |