| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | class ImportForm extends Model |
||
| 12 | { |
||
| 13 | /** @var integer */ |
||
| 14 | public $config_id; |
||
| 15 | /** @var UploadedFile */ |
||
| 16 | public $file; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @return array |
||
| 20 | */ |
||
| 21 | public function rules(): array |
||
| 22 | { |
||
| 23 | return [ |
||
| 24 | [['config_id', 'file'], 'required'], |
||
| 25 | ['config_id', 'integer'], |
||
| 26 | ['file', 'file', 'extensions' => ['dump', 'zip'], 'maxFiles' => 1] |
||
| 27 | ]; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return bool |
||
| 32 | * @throws \floor12\backup\Exceptions\ConfigurationNotFoundException |
||
| 33 | * @throws \floor12\backup\Exceptions\FileNotFoundException |
||
| 34 | * @throws \floor12\backup\Exceptions\ModuleNotConfiguredException |
||
| 35 | */ |
||
| 36 | public function import(): bool |
||
| 40 | } |
||
| 41 | } |
||
| 42 |