1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-14 07:54:04 +00:00

resolve all phpstan issues

This commit is contained in:
Samuel Štancl 2022-11-08 13:34:04 +01:00
parent b7a6953231
commit 942d79cbd7
12 changed files with 57 additions and 88 deletions

View file

@ -8,24 +8,11 @@ use Illuminate\Console\Command;
class CreatePendingTenants extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tenants:pending-create {--count= : The number of pending tenants to be created}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create pending tenants.';
/**
* Execute the console command.
*/
public function handle()
public function handle(): int
{
$this->info('Creating pending tenants.');
@ -46,13 +33,11 @@ class CreatePendingTenants extends Command
$this->info($createdCount . ' ' . str('tenant')->plural($createdCount) . ' created.');
$this->info($maxPendingTenantCount . ' ' . str('tenant')->plural($maxPendingTenantCount) . ' ready to be used.');
return 1;
return 0;
}
/**
* Calculate the number of currently available pending tenants.
*/
private function getPendingTenantCount(): int
/** Calculate the number of currently available pending tenants. */
protected function getPendingTenantCount(): int
{
return tenancy()
->query()