| Total Complexity | 9 |
| Total Lines | 89 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class Comment extends AbstractModel |
||
| 16 | { |
||
| 17 | use HasDescription; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var null|Event |
||
| 21 | * |
||
| 22 | * @ORM\ManyToOne(targetEntity="Event", inversedBy="comments") |
||
| 23 | * @ORM\JoinColumns({ |
||
| 24 | * @ORM\JoinColumn(nullable=true, onDelete="CASCADE") |
||
| 25 | * }) |
||
| 26 | */ |
||
| 27 | private $event; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set event |
||
| 31 | * |
||
| 32 | * @param null|Event $event |
||
| 33 | */ |
||
| 34 | public function setEvent(?Event $event): void |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get event |
||
| 49 | * |
||
| 50 | * @return null|Event |
||
| 51 | */ |
||
| 52 | public function getEvent(): ?Event |
||
| 53 | { |
||
| 54 | return $this->event; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @var null|News |
||
| 59 | * |
||
| 60 | * @ORM\ManyToOne(targetEntity="News", inversedBy="comments") |
||
| 61 | * @ORM\JoinColumns({ |
||
| 62 | * @ORM\JoinColumn(nullable=true, onDelete="CASCADE") |
||
| 63 | * }) |
||
| 64 | */ |
||
| 65 | private $news; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Set news |
||
| 69 | * |
||
| 70 | * @param null|News $news |
||
| 71 | */ |
||
| 72 | public function setNews(?News $news): void |
||
| 82 | } |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * Get news |
||
| 87 | * |
||
| 88 | * @return null|News |
||
| 89 | */ |
||
| 90 | public function getNews(): ?News |
||
| 93 | } |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Get owner name |
||
| 97 | * |
||
| 98 | * @return string |
||
| 99 | */ |
||
| 100 | public function getAuthorName(): string |
||
| 107 |