| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Send extends Uploader |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Send constructor. |
||
| 15 | * |
||
| 16 | * @param string $uploadDir |
||
| 17 | * @param string $fileTypeDir |
||
| 18 | * @param array $allowTypes |
||
| 19 | * @param array $extensions |
||
| 20 | * https://www.freeformatter.com/mime-types-list.html |
||
| 21 | */ |
||
| 22 | public function __construct(string $uploadDir, string $fileTypeDir, array $allowTypes, array $extensions) |
||
| 23 | { |
||
| 24 | parent::__construct($uploadDir, $fileTypeDir); |
||
| 25 | self::$allowTypes = $allowTypes; |
||
| 26 | self::$extensions = $extensions; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array $file |
||
| 31 | * @param string $name |
||
| 32 | * @return string |
||
| 33 | * @throws \Exception |
||
| 34 | */ |
||
| 35 | public function upload(array $file, string $name): string |
||
| 46 | } |
||
| 47 | } |