| Total Complexity | 3 | 
| Total Lines | 39 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 11 | class Media extends Uploader  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * Allow mp4 video and mp3 audio  | 
            ||
| 15 | * @var array allowed media types  | 
            ||
| 16 | * https://www.freeformatter.com/mime-types-list.html  | 
            ||
| 17 | */  | 
            ||
| 18 | protected static $allowTypes = [  | 
            ||
| 19 | "audio/mp3",  | 
            ||
| 20 | "audio/mpeg",  | 
            ||
| 21 | "video/mp4",  | 
            ||
| 22 | ];  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * Allowed extensions to types.  | 
            ||
| 26 | * @var array  | 
            ||
| 27 | */  | 
            ||
| 28 | protected static $extensions = [  | 
            ||
| 29 | "mp3",  | 
            ||
| 30 | "mp4"  | 
            ||
| 31 | ];  | 
            ||
| 32 | |||
| 33 | /**  | 
            ||
| 34 | * @param array $media  | 
            ||
| 35 | * @param string $name  | 
            ||
| 36 | * @return null|string  | 
            ||
| 37 | * @throws \Exception  | 
            ||
| 38 | */  | 
            ||
| 39 | public function upload(array $media, string $name): string  | 
            ||
| 52 |