| 1 | <?php |
||
| 8 | class DbBackupCommand extends Command |
||
| 9 | { |
||
| 10 | protected $backup; |
||
| 11 | protected $storage; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * The name and signature of the console command. |
||
| 15 | * |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $signature = 'run:dbbackup'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The console command description. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $description = 'Create Database backup.'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Create a new command instance. |
||
| 29 | * |
||
| 30 | * @return void |
||
|
|
|||
| 31 | */ |
||
| 32 | public function __construct(Backup $backup, Storage $storage) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Execute the console command. |
||
| 41 | * |
||
| 42 | * @return mixed |
||
| 43 | */ |
||
| 44 | public function handle() |
||
| 50 | } |
||
| 51 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.