*
* @var string
*/
- protected $signature = 'bookstack:regenerate-references {--database= : The database connection to use.}';
+ protected $signature = 'bookstack:regenerate-references
+ {--database= : The database connection to use}';
/**
* The console command description.
*/
protected $description = 'Regenerate all the cross-item model reference index';
- protected ReferenceStore $references;
-
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct(ReferenceStore $references)
- {
- $this->references = $references;
- parent::__construct();
- }
-
/**
* Execute the console command.
- *
- * @return int
*/
- public function handle()
+ public function handle(ReferenceStore $references): int
{
$connection = DB::getDefaultConnection();
DB::setDefaultConnection($this->option('database'));
}
- $this->references->updateForAllPages();
+ $references->updateForAllPages();
DB::setDefaultConnection($connection);