@@ -67,11 +67,11 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | public function register(): void |
| 69 | 69 | { |
| 70 | - $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) { |
|
| 70 | + $this->app->bind(ErrorHandlerInterface::class, function(ContainerInterface $app) { |
|
| 71 | 71 | return new ErrorHandler($app->get(LoggerInterface::class)); |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | - $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) { |
|
| 74 | + $this->app->bind(ErrorHandlerMiddleware::class, function(ContainerInterface $app) { |
|
| 75 | 75 | return new ErrorHandlerMiddleware( |
| 76 | 76 | $app->get(Config::class)->get('app.debug', false), |
| 77 | 77 | $app->get(LoggerInterface::class) |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ) { |
| 83 | 83 | parent::__construct($app, $repository, $config, $filesystem); |
| 84 | 84 | $this->setName('migration:create') |
| 85 | - ->setDescription('Create a new migration'); |
|
| 85 | + ->setDescription('Create a new migration'); |
|
| 86 | 86 | |
| 87 | 87 | $this->addArgument('name', 'name of migration', null, false, true); |
| 88 | 88 | } |
@@ -161,26 +161,3 @@ discard block |
||
| 161 | 161 | private function getTemplateClass(): string |
| 162 | 162 | { |
| 163 | 163 | return <<<EOF |
| 164 | - <?php |
|
| 165 | - namespace Platine\Framework\Migration; |
|
| 166 | - |
|
| 167 | - use Platine\Framework\Migration\AbstractMigration; |
|
| 168 | - |
|
| 169 | - class AddUserTable20210915100000 extends AbstractMigration |
|
| 170 | - { |
|
| 171 | - |
|
| 172 | - public function up(): void |
|
| 173 | - { |
|
| 174 | - //Action when migrate up |
|
| 175 | - |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - public function down(): void |
|
| 179 | - { |
|
| 180 | - //Action when migrate down |
|
| 181 | - |
|
| 182 | - } |
|
| 183 | - } |
|
| 184 | - EOF; |
|
| 185 | - } |
|
| 186 | -} |
|
@@ -161,26 +161,3 @@ |
||
| 161 | 161 | private function getTemplateClass(): string |
| 162 | 162 | { |
| 163 | 163 | return <<<EOF |
| 164 | - <?php |
|
| 165 | - namespace Platine\Framework\Migration; |
|
| 166 | - |
|
| 167 | - use Platine\Framework\Migration\AbstractMigration; |
|
| 168 | - |
|
| 169 | - class AddUserTable20210915100000 extends AbstractMigration |
|
| 170 | - { |
|
| 171 | - |
|
| 172 | - public function up(): void |
|
| 173 | - { |
|
| 174 | - //Action when migrate up |
|
| 175 | - |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - public function down(): void |
|
| 179 | - { |
|
| 180 | - //Action when migrate down |
|
| 181 | - |
|
| 182 | - } |
|
| 183 | - } |
|
| 184 | - EOF; |
|
| 185 | - } |
|
| 186 | -} |
|
@@ -161,26 +161,3 @@ |
||
| 161 | 161 | private function getTemplateClass(): string |
| 162 | 162 | { |
| 163 | 163 | return <<<EOF |
| 164 | - <?php |
|
| 165 | - namespace Platine\Framework\Migration; |
|
| 166 | - |
|
| 167 | - use Platine\Framework\Migration\AbstractMigration; |
|
| 168 | - |
|
| 169 | - class AddUserTable20210915100000 extends AbstractMigration |
|
| 170 | - { |
|
| 171 | - |
|
| 172 | - public function up(): void |
|
| 173 | - { |
|
| 174 | - //Action when migrate up |
|
| 175 | - |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - public function down(): void |
|
| 179 | - { |
|
| 180 | - //Action when migrate down |
|
| 181 | - |
|
| 182 | - } |
|
| 183 | - } |
|
| 184 | - EOF; |
|
| 185 | - } |
|
| 186 | -} |
|
@@ -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'); |
@@ -161,26 +159,3 @@ discard block |
||
| 161 | 159 | private function getTemplateClass(): string |
| 162 | 160 | { |
| 163 | 161 | return <<<EOF |
| 164 | - <?php |
|
| 165 | - namespace Platine\Framework\Migration; |
|
| 166 | - |
|
| 167 | - use Platine\Framework\Migration\AbstractMigration; |
|
| 168 | - |
|
| 169 | - class AddUserTable20210915100000 extends AbstractMigration |
|
| 170 | - { |
|
| 171 | - |
|
| 172 | - public function up(): void |
|
| 173 | - { |
|
| 174 | - //Action when migrate up |
|
| 175 | - |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - public function down(): void |
|
| 179 | - { |
|
| 180 | - //Action when migrate down |
|
| 181 | - |
|
| 182 | - } |
|
| 183 | - } |
|
| 184 | - EOF; |
|
| 185 | - } |
|
| 186 | -} |
|
@@ -161,26 +161,3 @@ |
||
| 161 | 161 | private function getTemplateClass(): string |
| 162 | 162 | { |
| 163 | 163 | return <<<EOF |
| 164 | - <?php |
|
| 165 | - namespace Platine\Framework\Migration; |
|
| 166 | - |
|
| 167 | - use Platine\Framework\Migration\AbstractMigration; |
|
| 168 | - |
|
| 169 | - class AddUserTable20210915100000 extends AbstractMigration |
|
| 170 | - { |
|
| 171 | - |
|
| 172 | - public function up(): void |
|
| 173 | - { |
|
| 174 | - //Action when migrate up |
|
| 175 | - |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - public function down(): void |
|
| 179 | - { |
|
| 180 | - //Action when migrate down |
|
| 181 | - |
|
| 182 | - } |
|
| 183 | - } |
|
| 184 | - EOF; |
|
| 185 | - } |
|
| 186 | -} |
|