We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public static function for(array $crudObject, array $uploaderConfiguration, string $crudObjectType, string $macro): UploaderInterface |
||
| 10 | { |
||
| 11 | if (isset($uploaderConfiguration['uploader']) && class_exists($uploaderConfiguration['uploader'])) { |
||
| 12 | return $uploaderConfiguration['uploader']::for($crudObject, $uploaderConfiguration); |
||
| 13 | } |
||
| 14 | |||
| 15 | if (app('UploadersRepository')->hasUploadFor($crudObject['type'], $macro)) { |
||
| 16 | return app('UploadersRepository')->getUploadFor($crudObject['type'], $macro)::for($crudObject, $uploaderConfiguration); |
||
| 17 | } |
||
| 18 | |||
| 19 | throw new Exception('Undefined upload type for '.$crudObjectType.' type: '.$crudObject['type']); |
||
| 20 | } |
||
| 21 | } |