| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | trait HasPublishedAtHelpers |
||
| 19 | { |
||
| 20 | public function initializeHasPublishedAtHelpers(): void |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * If entity is published. |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public function isPublished(): bool |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * If entity is unpublished. |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function isUnpublished(): bool |
||
| 41 | { |
||
| 42 | return !$this->isPublished(); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Mark entity as published. |
||
| 47 | * |
||
| 48 | * @return void |
||
| 49 | */ |
||
| 50 | public function publish(): void |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Mark entity as unpublished. |
||
| 60 | * |
||
| 61 | * @return void |
||
| 62 | */ |
||
| 63 | public function unpublish(): void |
||
| 71 |