Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class Text extends Base |
||
13 | { |
||
14 | |||
15 | 3 | public function __construct($content = '') |
|
16 | { |
||
17 | 3 | parent::__construct(); |
|
18 | 3 | $this->content($content); |
|
19 | 3 | $this->bodyName = 'text'; |
|
20 | 3 | } |
|
21 | |||
22 | 2 | protected function getBody() |
|
23 | { |
||
24 | 2 | return $this->body; |
|
25 | } |
||
26 | |||
27 | 3 | protected function bodyFields() |
|
28 | { |
||
29 | 3 | return ['content' => ['required' => true, 'type' => 'string']]; |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * append content |
||
34 | * 追加内容 |
||
35 | * |
||
36 | * @param string $content |
||
37 | * |
||
38 | * @return $this |
||
39 | */ |
||
40 | 1 | public function appendContent($content = '') |
|
45 | } |
||
46 | } |