Code Duplication    Length = 7-8 lines in 2 locations

src/Commands/MigrationCommand.php 2 locations

@@ 82-89 (lines=8) @@
79
                'table' => $parser->getTable(),
80
                'fields' => $this->getSchemaParser()->render(),
81
            ]);
82
        } elseif ($parser->isAdd()) {
83
            return Stub::create('/migration/add.stub', [
84
                'class' => $this->getClass(),
85
                'table' => $parser->getTable(),
86
                'fields_up' => $this->getSchemaParser()->up(),
87
                'fields_down' => $this->getSchemaParser()->down(),
88
            ]);
89
        } elseif ($parser->isDelete()) {
90
            return Stub::create('/migration/delete.stub', [
91
                'class' => $this->getClass(),
92
                'table' => $parser->getTable(),
@@ 96-102 (lines=7) @@
93
                'fields_down' => $this->getSchemaParser()->up(),
94
                'fields_up' => $this->getSchemaParser()->down(),
95
            ]);
96
        } elseif ($parser->isDrop()) {
97
            return Stub::create('/migration/drop.stub', [
98
                'class' => $this->getClass(),
99
                'table' => $parser->getTable(),
100
                'fields' => $this->getSchemaParser()->render(),
101
            ]);
102
        }
103
104
        throw new \InvalidArgumentException('Invalid migration name');
105
    }