diff --git a/src/Commands/Run.php b/src/Commands/Run.php index 4e622c6b..f3b2197f 100644 --- a/src/Commands/Run.php +++ b/src/Commands/Run.php @@ -5,9 +5,11 @@ declare(strict_types=1); namespace Stancl\Tenancy\Commands; use Illuminate\Console\Command; +use Stancl\Tenancy\Concerns\HasATenantsOption; class Run extends Command { + use HasATenantsOption; /** * The console command description. * @@ -21,7 +23,6 @@ class Run extends Command * @var string */ protected $signature = "tenants:run {commandname : The command's name.} - {--tenants=* : The tenant(s) to run the command for. Default: all} {--argument=* : The arguments to pass to the command. Default: none} {--option=* : The options to pass to the command. Default: none}"; diff --git a/src/Concerns/HasATenantsOption.php b/src/Concerns/HasATenantsOption.php index 055c6cd4..120bb21c 100644 --- a/src/Concerns/HasATenantsOption.php +++ b/src/Concerns/HasATenantsOption.php @@ -27,9 +27,9 @@ trait HasATenantsOption ->cursor(); } - protected function withPending(): bool + protected function withPending(): ?bool { - return $this->option('with-pending'); + return $this->option('with-pending') ? true : null; } public function __construct()