Passed
Push — master ( 27ee29...5ee236 )
by Curtis
05:59 queued 16s
created

DropTables   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A dispatch() 0 5 1
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Jobs\Tenant\DropTb as Job;
6
use LaravelEnso\Companies\Models\Company;
7
use LaravelEnso\Multitenancy\Commands\Tenant;
8
9
class DropTables extends Tenant
10
{
11
    protected $signature = 'enso:tenant:drop-tables {--all=false} {--tenantId}';
12
13
    protected $description = 'Drops all tables from tenant database(s)';
14
15
    public function dispatch(Company $company): void
16
    {
17
        $this->line(__('Dropping tables for company :company', ['company' => $company->name]));
0 ignored issues
show
Bug introduced by
It seems like __('Dropping tables for ...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 tables for company :company', ['company' => $company->name]));
Loading history...
18
19
        Job::dispatch($company);
20
    }
21
}
22