| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class Text extends Base |
||
| 13 | { |
||
| 14 | |||
| 15 | 1 | public function __construct($content = '') |
|
| 16 | { |
||
| 17 | 1 | parent::__construct(); |
|
| 18 | 1 | $this->content($content); |
|
| 19 | 1 | $this->bodyName = 'text'; |
|
| 20 | 1 | } |
|
| 21 | |||
| 22 | 1 | protected function getBody() |
|
| 23 | { |
||
| 24 | 1 | return $this->body; |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | protected function bodyFields() |
|
| 28 | { |
||
| 29 | 1 | 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 | } |