| Conditions | 5 |
| Paths | 16 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function __construct(array $fileData = []) |
||
| 30 | { |
||
| 31 | if (!empty($fileData['id'])) { |
||
| 32 | $this->id = (int) $fileData['id']; |
||
| 33 | } |
||
| 34 | if (!empty($fileData['name'])) { |
||
| 35 | $this->name = $fileData['name']; |
||
| 36 | } |
||
| 37 | if (!empty($fileData['ext'])) { |
||
| 38 | $this->ext = $fileData['ext']; |
||
| 39 | } |
||
| 40 | if (!empty($fileData['data'])) { |
||
| 41 | $this->data = $fileData['data']; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 117 |
If you suppress an error, we recommend checking for the error condition explicitly: