diff --git a/src/Commands/TenantDump.php b/src/Commands/TenantDump.php index c10a16ab..557c6975 100644 --- a/src/Commands/TenantDump.php +++ b/src/Commands/TenantDump.php @@ -13,9 +13,6 @@ use Symfony\Component\Console\Input\InputOption; class TenantDump extends DumpCommand { - /** - * Create a new command instance. - */ public function __construct() { parent::__construct(); @@ -24,15 +21,7 @@ class TenantDump extends DumpCommand $this->specifyParameters(); } - /** - * Execute the console command. - * - * @param \Illuminate\Database\ConnectionResolverInterface $connections - * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher - * @return int - * - * @throws \Throwable - */ + public function handle(ConnectionResolverInterface $connections, Dispatcher $dispatcher): int { $this->tenant()->run(fn() => parent::handle($connections, $dispatcher)); @@ -40,19 +29,12 @@ class TenantDump extends DumpCommand return Command::SUCCESS; } - /** - * Get tenant to use as a template for the schema dump. - * - * @return \Stancl\Tenancy\Contracts\Tenant - * - * @throws \Throwable - */ public function tenant(): Tenant { $tenant = $this->option('tenant') ?? tenant() - ?? tenancy()->query()->first() - ?? $this->ask('What tenant do you want to dump the schema for?'); + ?? $this->ask('What tenant do you want to dump the schema for?') + ?? tenancy()->query()->first(); if (! $tenant instanceof Tenant) { $tenant = tenancy()->find($tenant); @@ -63,11 +45,6 @@ class TenantDump extends DumpCommand return $tenant; } - /** - * Get the console command options. - * - * @return array - */ protected function getOptions(): array { return array_merge([