| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 1 | public function toArray() |
|
| 30 | { |
||
| 31 | 1 | $data = [ |
|
| 32 | 1 | 'type' => $this->getType(), |
|
| 33 | 1 | 'action_id' => $this->getActionId(), |
|
| 34 | 1 | 'options' => $this->getOptionsAsArrays(), |
|
| 35 | ]; |
||
| 36 | |||
| 37 | 1 | if ($this->getConfirm()) { |
|
| 38 | 1 | $data['confirm'] = $this->getConfirm()->toArray(); |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | return $data; |
|
| 42 | } |
||
| 44 |