| Conditions | 5 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function convertUploadedFiles(array $files) |
||
| 39 | { |
||
| 40 | return array_map(function ($file) { |
||
| 41 | if (is_null($file) || (is_array($file) && empty(array_filter($file)))) { |
||
| 42 | return $file; |
||
| 43 | } |
||
| 44 | |||
| 45 | return is_array($file) |
||
| 46 | ? $this->convertUploadedFiles($file) |
||
| 47 | : UploadedFile::createFromBase($file, true); |
||
| 48 | }, $files); |
||
| 49 | } |
||
| 50 | |||
| 52 |