1 | <?php |
||
14 | class DbRestore extends Command |
||
15 | { |
||
16 | use ConfirmableTrait; |
||
17 | |||
18 | /** |
||
19 | * The name and signature of the console command. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $signature = 'db:restore {file : Dump file path to restore.} |
||
24 | {--database= : The database connection to use.} |
||
25 | {--force : Force the operation to run when in production.}'; |
||
26 | |||
27 | /** |
||
28 | * The console command description. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $description = 'Restore mysql dump.'; |
||
33 | |||
34 | /** |
||
35 | * Execute the console command. |
||
36 | * |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function handle(): void |
||
59 | |||
60 | protected function getDatabase(): string |
||
66 | |||
67 | protected function getFilePath(): string |
||
73 | } |
||
74 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.