| Total Complexity | 8 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | trait MutablePostTrait |
||
| 12 | { |
||
| 13 | use PostTrait; |
||
| 14 | |||
| 15 | public function setExcerpt(string $excerpt): self |
||
| 16 | { |
||
| 17 | $this->post->post_excerpt = $excerpt; |
||
| 18 | |||
| 19 | return $this; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function setStatus(PostStatusInterface $status): self |
||
| 23 | { |
||
| 24 | $this->post->post_status = $status->getName(); |
||
| 25 | |||
| 26 | return $this; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function setCategories(CategoryCollectionInterface $categories): self |
||
| 30 | { |
||
| 31 | $this->categories = $categories; |
||
| 32 | |||
| 33 | return $this; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function addCategories(CategoryInterface ...$categories): self |
||
| 37 | { |
||
| 38 | $this->getCategories()->collect(...$categories); |
||
| 39 | |||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function mergeCategories(CategoryCollectionInterface $categories): self |
||
| 44 | { |
||
| 45 | $this->getCategories()->collect(...$categories->values()); |
||
| 46 | |||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function setTags(TagCollectionInterface $tags): self |
||
| 55 | } |
||
| 56 | |||
| 57 | public function addTags(TagInterface ...$tags): self |
||
| 62 | } |
||
| 63 | |||
| 64 | public function mergeTags(TagCollectionInterface $tags): self |
||
| 69 | } |
||
| 70 | } |
||
| 71 |