| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | trait HasContentTrait |
||
| 10 | { |
||
| 11 | protected $content = null; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @return null |
||
| 15 | */ |
||
| 16 | 6 | public function getContent() |
|
| 17 | { |
||
| 18 | 6 | return $this->content; |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return bool |
||
| 23 | */ |
||
| 24 | 4 | public function hasContent(): bool |
|
| 25 | { |
||
| 26 | 4 | return $this->content !== null; |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $content |
||
| 31 | */ |
||
| 32 | 2 | public function setContent(string $content): void |
|
| 33 | { |
||
| 34 | 2 | $this->content = $content; |
|
| 35 | 2 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $content |
||
| 39 | */ |
||
| 40 | 1 | public function appendContent($content): void |
|
| 48 | 1 | } |
|
| 49 | |||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $content |
||
| 53 | */ |
||
| 54 | 1 | public function prependContent($content): void |
|
| 62 | 1 | } |
|
| 63 | } |
||
| 64 |