Conditions | 5 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | protected function mimeType(?Filesystem $disk, string $path) |
||
37 | { |
||
38 | try { |
||
39 | if ($disk && method_exists($disk, 'mimeType')) { |
||
40 | return $disk->mimeType($path) ?: false; |
||
41 | } |
||
42 | } catch (Exception $exception) { |
||
43 | // Some drivers throw exceptions when checking mime types, we'll |
||
44 | // just fallback to `false`. |
||
45 | } |
||
46 | |||
47 | return false; |
||
48 | } |
||
49 | } |
||
50 |