@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @template T |
62 | 62 | * @extends AbstractCommand<T> |
63 | 63 | */ |
64 | -class MigrationCreateCommand extends AbstractCommand |
|
65 | -{ |
|
64 | +class MigrationCreateCommand extends AbstractCommand { |
|
66 | 65 | |
67 | 66 | /** |
68 | 67 | * The migration name |
@@ -90,8 +89,7 @@ discard block |
||
90 | 89 | /** |
91 | 90 | * {@inheritodc} |
92 | 91 | */ |
93 | - public function execute() |
|
94 | - { |
|
92 | + public function execute() { |
|
95 | 93 | $writer = $this->io()->writer(); |
96 | 94 | |
97 | 95 | $version = date('Ymd_His'); |
@@ -160,26 +158,3 @@ discard block |
||
160 | 158 | private function getTemplateClass(): string |
161 | 159 | { |
162 | 160 | return <<<EOF |
163 | - <?php |
|
164 | - namespace Platine\Framework\Migration; |
|
165 | - |
|
166 | - use Platine\Framework\Migration\AbstractMigration; |
|
167 | - |
|
168 | - class %classname% extends AbstractMigration |
|
169 | - { |
|
170 | - |
|
171 | - public function up(): void |
|
172 | - { |
|
173 | - //Action when migrate up |
|
174 | - |
|
175 | - } |
|
176 | - |
|
177 | - public function down(): void |
|
178 | - { |
|
179 | - //Action when migrate down |
|
180 | - |
|
181 | - } |
|
182 | - } |
|
183 | - EOF; |
|
184 | - } |
|
185 | -} |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * @class AbstractSeed |
54 | 54 | * @package Platine\Framework\Migration\Seed |
55 | 55 | */ |
56 | -abstract class AbstractSeed extends QueryBuilder |
|
57 | -{ |
|
56 | +abstract class AbstractSeed extends QueryBuilder { |
|
58 | 57 | /** |
59 | 58 | * Run the seed |
60 | 59 | * @return void |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @template T |
60 | 60 | * @extends AbstractSeedCommand<T> |
61 | 61 | */ |
62 | -class SeedExecuteCommand extends AbstractSeedCommand |
|
63 | -{ |
|
62 | +class SeedExecuteCommand extends AbstractSeedCommand { |
|
64 | 63 | |
65 | 64 | /** |
66 | 65 | * Create new instance |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | /** |
82 | 81 | * {@inheritodc} |
83 | 82 | */ |
84 | - public function execute() |
|
85 | - { |
|
83 | + public function execute() { |
|
86 | 84 | $io = $this->io(); |
87 | 85 | $writer = $io->writer(); |
88 | 86 | $writer->boldYellow('SEED EXECUTION', true)->eol(); |
@@ -64,8 +64,7 @@ |
||
64 | 64 | * @package Platine\Framework\Migration\Seed\Command |
65 | 65 | * @template T |
66 | 66 | */ |
67 | -abstract class AbstractSeedCommand extends Command |
|
68 | -{ |
|
67 | +abstract class AbstractSeedCommand extends Command { |
|
69 | 68 | |
70 | 69 | /** |
71 | 70 | * The configuration to use |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @template T |
62 | 62 | * @extends AbstractSeedCommand<T> |
63 | 63 | */ |
64 | -class SeedCreateCommand extends AbstractSeedCommand |
|
65 | -{ |
|
64 | +class SeedCreateCommand extends AbstractSeedCommand { |
|
66 | 65 | |
67 | 66 | /** |
68 | 67 | * The seed name |
@@ -89,8 +88,7 @@ discard block |
||
89 | 88 | /** |
90 | 89 | * {@inheritodc} |
91 | 90 | */ |
92 | - public function execute() |
|
93 | - { |
|
91 | + public function execute() { |
|
94 | 92 | $writer = $this->io()->writer(); |
95 | 93 | |
96 | 94 | $className = $this->getSeedClassName($this->name); |
@@ -157,20 +155,3 @@ discard block |
||
157 | 155 | private function getTemplateClass(): string |
158 | 156 | { |
159 | 157 | return <<<EOF |
160 | - <?php |
|
161 | - namespace Platine\Framework\Migration\Seed; |
|
162 | - |
|
163 | - use Platine\Framework\Migration\Seed\AbstractSeed; |
|
164 | - |
|
165 | - class %classname% extends AbstractSeed |
|
166 | - { |
|
167 | - |
|
168 | - public function run(): void |
|
169 | - { |
|
170 | - //Action when run the seed |
|
171 | - |
|
172 | - } |
|
173 | - } |
|
174 | - EOF; |
|
175 | - } |
|
176 | -} |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @template T |
58 | 58 | * @extends AbstractSeedCommand<T> |
59 | 59 | */ |
60 | -class SeedStatusCommand extends AbstractSeedCommand |
|
61 | -{ |
|
60 | +class SeedStatusCommand extends AbstractSeedCommand { |
|
62 | 61 | |
63 | 62 | /** |
64 | 63 | * Create new instance |
@@ -77,8 +76,7 @@ discard block |
||
77 | 76 | /** |
78 | 77 | * {@inheritodc} |
79 | 78 | */ |
80 | - public function execute() |
|
81 | - { |
|
79 | + public function execute() { |
|
82 | 80 | $writer = $this->io()->writer(); |
83 | 81 | $writer->boldYellow('SEED STATUS', true)->eol(); |
84 | 82 | $writer->bold('Seed path: '); |