Conditions | 5 |
Paths | 16 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public function toArray() |
||
49 | { |
||
50 | $result = []; |
||
51 | if (!empty($this->id)) { |
||
52 | $result['id'] = $this->getId(); |
||
53 | } |
||
54 | if (!empty($this->name)) { |
||
55 | $result['name'] = $this->getName(); |
||
56 | } |
||
57 | if (!empty($this->ext)) { |
||
58 | $result['ext'] = $this->getExt(); |
||
59 | } |
||
60 | if (!empty($this->data)) { |
||
61 | $result['data'] = $this->getData(); |
||
62 | } |
||
63 | return $result; |
||
64 | } |
||
65 | |||
117 |
If you suppress an error, we recommend checking for the error condition explicitly: