mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
phpstan fix
This commit is contained in:
parent
47364007aa
commit
5ef7604e17
1 changed files with 5 additions and 2 deletions
|
|
@ -21,8 +21,11 @@ class Tinker extends BaseTinker
|
|||
public function handle()
|
||||
{
|
||||
// ?: to support empty strings so that the original argument (`include`) can be reached even with a falsy tenant argument
|
||||
tenancy()->initialize($this->argument('tenant') ?: tenancy()->model()::first());
|
||||
|
||||
parent::handle();
|
||||
/** @var \Stancl\Tenancy\Contracts\Tenant|string|int $tenantKey */
|
||||
$tenantKey = $this->argument('tenant') ?: tenancy()->model()::first();
|
||||
tenancy()->initialize($tenantKey);
|
||||
|
||||
return parent::handle();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue