Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function transform($data) |
||
20 | { |
||
21 | if (!is_array($data)) { |
||
22 | $data = array( |
||
23 | 'file' => $data |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | if (!is_null($data['file']) && !$data['file'] instanceof File) { |
||
28 | $data['file'] = new UploadableFile($this->root_dir, $data['file']); |
||
29 | } |
||
30 | |||
31 | return $data; |
||
32 | } |
||
33 | |||
47 |