Passed
Push — master ( e1e86f...c6853e )
by Curtis
05:23 queued 11s
created

Migrate   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

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

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