Passed
Pull Request — master (#15)
by Richard
06:30
created

ArtomatorMigrationCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
1
<?php
2
3
namespace PWWEB\Artomator\Commands;
4
5
use Laracasts\Generators\Commands\MigrationMakeCommand as BaseCommand;
6
use Laracasts\Generators\Migrations\NameParser;
7
8
class ArtomatorMigrationCommand extends BaseCommand
9
{
10
    /**
11
     * The console command name.
12
     *
13
     * @var string
14
     */
15
    protected $name = 'artomator:migration';
16
17
    /**
18
     * Execute the console command.
19
     *
20
     * @return boolean
21
     */
22
    public function handle()
23
    {
24
        $this->meta = (new NameParser)->parse($this->argument('name'));
0 ignored issues
show
Bug introduced by
It seems like $this->argument('name') can also be of type string[]; however, parameter $name of Laracasts\Generators\Mig...ons\NameParser::parse() 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

24
        $this->meta = (new NameParser)->parse(/** @scrutinizer ignore-type */ $this->argument('name'));
Loading history...
25
26
        parent::makeMigration();
27
    }
28
}
29