| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | trait PublishableTrait |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @ORM\Column(type="date") |
||
| 26 | * @Assert\NotNull |
||
| 27 | */ |
||
| 28 | private ?\DateTimeInterface $publishedAt = null; |
||
| 29 | |||
| 30 | private ?self $publishedResource = null; |
||
| 31 | |||
| 32 | /** @return static */ |
||
| 33 | public function setPublishedAt(?\DateTimeInterface $publishedAt) |
||
| 34 | { |
||
| 35 | $this->publishedAt = $publishedAt; |
||
| 36 | |||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getPublishedAt(): ?\DateTimeInterface |
||
| 41 | { |
||
| 42 | return $this->publishedAt; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function isPublished(): bool |
||
| 46 | { |
||
| 47 | return null !== $this->publishedAt; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** @return static */ |
||
| 51 | public function setPublishedResource($publishedResource) |
||
| 52 | { |
||
| 53 | $this->publishedResource = $publishedResource; |
||
| 54 | |||
| 55 | return $this; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getPublishedResource(): ?self |
||
| 61 | } |
||
| 62 | } |
||
| 63 |