| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public static function create(string $path) |
||
| 11 | { |
||
| 12 | $fileSize = File::getHumanReadableSize(filesize($path)); |
||
| 13 | |||
| 14 | $maxFileSize = File::getHumanReadableSize(config('medialibrary.max_file_size')); |
||
| 15 | |||
| 16 | return new static("File `{$path}` has a size of {$fileSize} which is greater than the maximum allowed {$maxFileSize}"); |
||
| 17 | } |
||
| 18 | } |
||
| 19 |