Issues (172)

app/Console/Commands/DropDatabase.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Jobs\Tenant\DropDB as Job;
6
use LaravelEnso\Companies\Models\Company;
7
use LaravelEnso\Multitenancy\Commands\Tenant;
8
9
class DropDatabase extends Tenant
10
{
11
    protected $signature = 'enso:tenant:drop-database {--all=false} {--tenantId}';
12
13
    protected $description = 'Drops tenant database(s)';
14
15
    public function dispatch(Company $company): void
16
    {
17
        $this->line(__('Dropping database for company :company', ['company' => $company->name]));
0 ignored issues
show
It seems like __('Dropping database fo...ny' => $company->name)) can also be of type array and array; however, parameter $string of Illuminate\Console\Command::line() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

17
        $this->line(/** @scrutinizer ignore-type */ __('Dropping database for company :company', ['company' => $company->name]));
Loading history...
18
19
        Job::dispatch($company);
20
    }
21
}
22