| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 77 | public function toArray(): array |
||
| 78 | { |
||
| 79 | $array = [ |
||
| 80 | 'session' => $this->session, |
||
| 81 | 'data' => $this->data, |
||
| 82 | 'type' => $this->type, |
||
| 83 | 'to' => $this->to |
||
| 84 | ]; |
||
| 85 | foreach ($array as $key => $value) { |
||
| 86 | if (is_null($value) || $value == '') { |
||
| 87 | unset($array[$key]); |
||
| 88 | } |
||
| 89 | } |
||
| 90 | return $array; |
||
| 91 | } |
||
| 93 |