@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @template T |
59 | 59 | * @extends AbstractCommand<T> |
60 | 60 | */ |
61 | -class MigrationMigrateCommand extends AbstractCommand |
|
62 | -{ |
|
61 | +class MigrationMigrateCommand extends AbstractCommand { |
|
63 | 62 | |
64 | 63 | /** |
65 | 64 | * Create new instance |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | /** |
80 | 79 | * {@inheritodc} |
81 | 80 | */ |
82 | - public function execute() |
|
83 | - { |
|
81 | + public function execute() { |
|
84 | 82 | $io = $this->io(); |
85 | 83 | $writer = $io->writer(); |
86 | 84 | $writer->boldYellow('MIGRATION UPGRADE TO LATEST', true)->eol(); |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @template T |
59 | 59 | * @extends AbstractCommand<T> |
60 | 60 | */ |
61 | -class MigrationResetCommand extends AbstractCommand |
|
62 | -{ |
|
61 | +class MigrationResetCommand extends AbstractCommand { |
|
63 | 62 | |
64 | 63 | /** |
65 | 64 | * Create new instance |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | /** |
80 | 79 | * {@inheritodc} |
81 | 80 | */ |
82 | - public function execute() |
|
83 | - { |
|
81 | + public function execute() { |
|
84 | 82 | $io = $this->io(); |
85 | 83 | $writer = $io->writer(); |
86 | 84 | $writer->boldYellow('ALL MIGRATION ROLLBACK', true)->eol(); |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * @template T |
61 | 61 | * @extends AbstractCommand<T> |
62 | 62 | */ |
63 | -class MigrationInitCommand extends AbstractCommand |
|
64 | -{ |
|
63 | +class MigrationInitCommand extends AbstractCommand { |
|
65 | 64 | |
66 | 65 | /** |
67 | 66 | * The schema to use |
@@ -91,8 +90,7 @@ discard block |
||
91 | 90 | /** |
92 | 91 | * {@inheritodc} |
93 | 92 | */ |
94 | - public function execute() |
|
95 | - { |
|
93 | + public function execute() { |
|
96 | 94 | $io = $this->io(); |
97 | 95 | $writer = $io->writer(); |
98 | 96 | $writer->boldYellow('MIGRATION INITIALIZATION', true); |
@@ -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 | -} |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @template T |
60 | 60 | * @extends AbstractCommand<T> |
61 | 61 | */ |
62 | -class MigrationExecuteCommand extends AbstractCommand |
|
63 | -{ |
|
62 | +class MigrationExecuteCommand extends AbstractCommand { |
|
64 | 63 | |
65 | 64 | /** |
66 | 65 | * Create new instance |
@@ -93,8 +92,7 @@ discard block |
||
93 | 92 | /** |
94 | 93 | * {@inheritodc} |
95 | 94 | */ |
96 | - public function execute() |
|
97 | - { |
|
95 | + public function execute() { |
|
98 | 96 | $type = $this->getArgumentValue('type'); |
99 | 97 | |
100 | 98 | $io = $this->io(); |
@@ -65,8 +65,7 @@ |
||
65 | 65 | * @package Platine\Framework\Migration\Command |
66 | 66 | * @template T |
67 | 67 | */ |
68 | -abstract class AbstractCommand extends Command |
|
69 | -{ |
|
68 | +abstract class AbstractCommand extends Command { |
|
70 | 69 | |
71 | 70 | /** |
72 | 71 | * The migration repository |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @template T |
60 | 60 | * @extends AbstractCommand<T> |
61 | 61 | */ |
62 | -class MigrationStatusCommand extends AbstractCommand |
|
63 | -{ |
|
62 | +class MigrationStatusCommand extends AbstractCommand { |
|
64 | 63 | |
65 | 64 | /** |
66 | 65 | * Create new instance |
@@ -80,8 +79,7 @@ discard block |
||
80 | 79 | /** |
81 | 80 | * {@inheritodc} |
82 | 81 | */ |
83 | - public function execute() |
|
84 | - { |
|
82 | + public function execute() { |
|
85 | 83 | $writer = $this->io()->writer(); |
86 | 84 | $writer->boldYellow('MIGRATION STATUS', true)->eol(); |
87 | 85 | $writer->bold('Migration path: '); |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @package Platine\Framework\Console\Command |
62 | 62 | * @template T |
63 | 63 | */ |
64 | -class RouteCommand extends Command |
|
65 | -{ |
|
64 | +class RouteCommand extends Command { |
|
66 | 65 | /** |
67 | 66 | * The configuration instance |
68 | 67 | * @var Config<T> |
@@ -77,8 +76,7 @@ discard block |
||
77 | 76 | * @param Config<T> $config |
78 | 77 | * @param Router $router |
79 | 78 | */ |
80 | - public function __construct(Application $application, Config $config, Router $router) |
|
81 | - { |
|
79 | + public function __construct(Application $application, Config $config, Router $router) { |
|
82 | 80 | parent::__construct('route', 'Command to manage route'); |
83 | 81 | |
84 | 82 | $this->addOption('-l|--list', 'Show route list', null, false); |
@@ -88,8 +86,7 @@ discard block |
||
88 | 86 | $this->application = $application; |
89 | 87 | } |
90 | 88 | |
91 | - public function execute() |
|
92 | - { |
|
89 | + public function execute() { |
|
93 | 90 | if ($this->getOptionValue('list')) { |
94 | 91 | $this->showRouteList(); |
95 | 92 | } |