| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | trait PublishableTrait |
||
| 20 | { |
||
| 21 | // Needs to be protected instead of published so reflection can read property when merging draft into published |
||
| 22 | protected ?\DateTimeInterface $publishedAt = null; |
||
| 23 | |||
| 24 | protected ?self $publishedResource = null; |
||
| 25 | |||
| 26 | protected ?self $draftResource = null; |
||
| 27 | |||
| 28 | /** @return static */ |
||
| 29 | public function setPublishedAt(?\DateTimeInterface $publishedAt) |
||
| 30 | { |
||
| 31 | $this->publishedAt = $publishedAt; |
||
| 32 | |||
| 33 | return $this; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getPublishedAt(): ?\DateTimeInterface |
||
| 39 | } |
||
| 40 | |||
| 41 | /** @return static */ |
||
| 42 | public function setPublishedResource($publishedResource) |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getPublishedResource(): ?self |
||
| 50 | { |
||
| 51 | return $this->publishedResource; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getDraftResource(): ?self |
||
| 57 | } |
||
| 58 | } |
||
| 59 |