Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 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) |
||
34 | } |
||
35 | |||
36 | public function getPublishedAt(): ?\DateTimeInterface |
||
39 | } |
||
40 | |||
41 | /** @return static */ |
||
42 | public function setPublishedResource($publishedResource) |
||
43 | { |
||
44 | $this->publishedResource = $publishedResource; |
||
45 | |||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | public function getPublishedResource(): ?self |
||
52 | } |
||
53 | |||
54 | public function getDraftResource(): ?self |
||
59 |