| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | public function getByFileExtension($extension): string |
||
| 51 | { |
||
| 52 | # Returns the system MIME type (as defined in /etc/mime.types) for the filename specified. |
||
| 53 | # |
||
| 54 | # $file - the filename to examine |
||
| 55 | $types = $this->getAll(); |
||
| 56 | |||
| 57 | return $types[strtolower($extension)] ?? null; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |