Completed
Push — master ( 2aaf94...819fcf )
by Ryan
08:39
created

MigrateMakeCommand::getOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 11
loc 11
rs 9.4285
c 0
b 0
f 0
1
<?php namespace Anomaly\Streams\Platform\Database\Migration\Console;
2
3
use Anomaly\Streams\Platform\Database\Migration\Console\Command\ConfigureCreator;
4
use Anomaly\Streams\Platform\Database\Migration\MigrationCreator;
5
use Illuminate\Foundation\Bus\DispatchesJobs;
6
use Symfony\Component\Console\Input\InputOption;
7
8
/**
9
 * Class MigrateMakeCommand
10
 *
11
 * @link   http://pyrocms.com/
12
 * @author PyroCMS, Inc. <[email protected]>
13
 * @author Ryan Thompson <[email protected]>
14
 */
15
class MigrateMakeCommand extends \Illuminate\Database\Console\Migrations\MigrateMakeCommand
16
{
17
18
    use DispatchesJobs;
19
20
    /**
21
     * The console command signature.
22
     *
23
     * @var string
24
     */
25
    protected $signature = 'make:migration {name : The name of the migration.}
26
        {--table= : The table to migrate.}
27
        {--create= : The table to be created.}
28
        {--fields : Create a fields migration.}
29
        {--addon= : The addon to create a migration for.}
30
        {--stream= : The stream to create a migration for.}
31
        {--path= : The location where the migration file should be created.}';
32
33
    /**
34
     * The migration creator.
35
     *
36
     * @var MigrationCreator
37
     */
38
    protected $creator;
39
40
    /**
41
     * Execute the console command.
42
     */
43
    public function fire()
44
    {
45
        $this->dispatch(
46
            new ConfigureCreator(
47
                $this,
48
                $this->input,
49
                $this->creator
50
            )
51
        );
52
53
        $this->creator->setInput($this->input);
54
55
        parent::fire();
56
    }
57
}
58