@@ -43,7 +43,9 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public static function toList($data) |
| 45 | 45 | { |
| 46 | - if (!($data instanceof self)) throw new \Exception(" It's not a model."); |
|
| 46 | + if (!($data instanceof self)) { |
|
| 47 | + throw new \Exception(" It's not a model."); |
|
| 48 | + } |
|
| 47 | 49 | |
| 48 | 50 | $data = array_map(function ($object) { |
| 49 | 51 | return $object->toArray(); |