Total Complexity | 6 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait DocBlockTrait |
||
8 | { |
||
9 | protected ?Comment $docBlock = null; |
||
10 | |||
11 | 1 | public function getDocBlock(): ?Comment |
|
12 | { |
||
13 | 1 | return $this->docBlock; |
|
14 | } |
||
15 | |||
16 | 5 | public function setDocBlock(string $text): self |
|
17 | { |
||
18 | 5 | $this->docBlock = Comment::docBlock($text); |
|
19 | |||
20 | 5 | return $this; |
|
21 | } |
||
22 | |||
23 | 1 | public function createDocBlock(string $text = ''): Comment |
|
24 | { |
||
25 | 1 | return $this->docBlock = Comment::docBlock($text); |
|
26 | } |
||
27 | |||
28 | 2 | public function removeDocBlock(): self |
|
29 | { |
||
30 | 2 | $this->docBlock = null; |
|
31 | |||
32 | 2 | return $this; |
|
33 | } |
||
34 | |||
35 | 34 | protected function buildDocBlock() |
|
44 | } |
||
45 | } |
||
46 |