| Total Complexity | 9 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Article extends BaseArticle implements ArticleInterface |
||
| 14 | { |
||
| 15 | /** @var AdminUserInterface|null */ |
||
| 16 | protected $author; |
||
| 17 | |||
| 18 | /** @var Collection|ChannelInterface[] */ |
||
| 19 | protected $channels; |
||
| 20 | |||
| 21 | public function __construct() |
||
| 22 | { |
||
| 23 | parent::__construct(); |
||
| 24 | |||
| 25 | $this->channels = new ArrayCollection(); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritdoc |
||
| 30 | */ |
||
| 31 | public function getAuthor(): ?AdminUserInterface |
||
| 32 | { |
||
| 33 | return $this->author; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @inheritdoc |
||
| 38 | */ |
||
| 39 | public function setAuthor(?AdminUserInterface $author): void |
||
| 40 | { |
||
| 41 | $this->author = $author; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @inheritdoc |
||
| 46 | */ |
||
| 47 | public function getChannels(): Collection |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @inheritdoc |
||
| 54 | */ |
||
| 55 | public function hasChannel(ChannelInterface $channel): bool |
||
| 56 | { |
||
| 57 | return $this->channels->contains($channel); |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @inheritdoc |
||
| 62 | */ |
||
| 63 | public function addChannel(ChannelInterface $channel): void |
||
| 67 | } |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @inheritdoc |
||
| 72 | */ |
||
| 73 | public function removeChannel(ChannelInterface $channel): void |
||
| 77 | } |
||
| 78 | } |
||
| 80 |