| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 64 | public function toArray(): array |
||
| 65 | { |
||
| 66 | $data = [ |
||
| 67 | 'text' => $this->text, |
||
| 68 | 'type' => $this->type]; |
||
| 69 | |||
| 70 | if ($this->type === self::MARKDOWN) { |
||
| 71 | $data['verbatim'] = $this->verbatim; |
||
| 72 | } |
||
| 73 | if ($this->type === self::PLAIN_TEXT) { |
||
| 74 | $data['emoji'] = $this->emoji; |
||
| 75 | } |
||
| 76 | return $data; |
||
| 77 | } |
||
| 79 |