Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 2 | public function detectForFilename(string $filemame) : string |
|
27 | { |
||
28 | 2 | if ($extension = pathinfo($filemame, PATHINFO_EXTENSION)) { |
|
29 | 2 | if ($guessedType = $this->mimeTypes->getMimeType($extension)) { |
|
30 | 2 | return $guessedType; |
|
31 | } |
||
32 | } |
||
33 | |||
34 | 1 | return 'application/octet-stream'; |
|
35 | } |
||
36 | } |
||
37 |