@@ -71,7 +71,7 @@ |
||
| 71 | 71 | ) { |
| 72 | 72 | parent::__construct($app, $repository, $config, $filesystem); |
| 73 | 73 | $this->setName('migration:migrate') |
| 74 | - ->setDescription('Upgrade migration to latest'); |
|
| 74 | + ->setDescription('Upgrade migration to latest'); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | ) { |
| 72 | 72 | parent::__construct($app, $repository, $config, $filesystem); |
| 73 | 73 | $this->setName('migration:reset') |
| 74 | - ->setDescription('Rollback all migration done before'); |
|
| 74 | + ->setDescription('Rollback all migration done before'); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ) { |
| 81 | 81 | parent::__construct($app, $repository, $config, $filesystem); |
| 82 | 82 | $this->setName('migration:create') |
| 83 | - ->setDescription('Create a new migration'); |
|
| 83 | + ->setDescription('Create a new migration'); |
|
| 84 | 84 | |
| 85 | 85 | $this->addArgument('name', 'name of migration', null, false, true); |
| 86 | 86 | } |
@@ -158,26 +158,3 @@ discard block |
||
| 158 | 158 | private function getTemplateClass(): string |
| 159 | 159 | { |
| 160 | 160 | return <<<EOF |
| 161 | - <?php |
|
| 162 | - namespace Platine\Framework\Migration; |
|
| 163 | - |
|
| 164 | - use Platine\Framework\Migration\AbstractMigration; |
|
| 165 | - |
|
| 166 | - class %classname% extends AbstractMigration |
|
| 167 | - { |
|
| 168 | - |
|
| 169 | - public function up(): void |
|
| 170 | - { |
|
| 171 | - //Action when migrate up |
|
| 172 | - |
|
| 173 | - } |
|
| 174 | - |
|
| 175 | - public function down(): void |
|
| 176 | - { |
|
| 177 | - //Action when migrate down |
|
| 178 | - |
|
| 179 | - } |
|
| 180 | - } |
|
| 181 | - EOF; |
|
| 182 | - } |
|
| 183 | -} |
|
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | ) { |
| 73 | 73 | parent::__construct($app, $repository, $config, $filesystem); |
| 74 | 74 | $this->setName('migration:exec') |
| 75 | - ->setDescription('Execute the migration up/down for one version'); |
|
| 75 | + ->setDescription('Execute the migration up/down for one version'); |
|
| 76 | 76 | |
| 77 | 77 | $this->addArgument('type', 'type of migration [up|down]', 'up', true, true, false, function ($val) { |
| 78 | 78 | if (!in_array($val, ['up', 'down'])) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | )); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - return $val; |
|
| 85 | + return $val; |
|
| 86 | 86 | }); |
| 87 | 87 | |
| 88 | 88 | $this->addOption('-i|--id', 'the migration version', null, false, true); |
@@ -214,9 +214,9 @@ discard block |
||
| 214 | 214 | protected function getExecuted(string $orderDir = 'ASC'): array |
| 215 | 215 | { |
| 216 | 216 | $migrations = $this->repository |
| 217 | - ->query() |
|
| 218 | - ->orderBy('version', $orderDir) |
|
| 219 | - ->all(); |
|
| 217 | + ->query() |
|
| 218 | + ->orderBy('version', $orderDir) |
|
| 219 | + ->all(); |
|
| 220 | 220 | $result = []; |
| 221 | 221 | |
| 222 | 222 | foreach ($migrations as $entity) { |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | protected function getMigrationClassName(string $description, string $version): string |
| 236 | 236 | { |
| 237 | 237 | return Str::camel($description, false) |
| 238 | - . Str::replaceFirst('_', '', $version); |
|
| 238 | + . Str::replaceFirst('_', '', $version); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | ) { |
| 73 | 73 | parent::__construct($app, $repository, $config, $filesystem); |
| 74 | 74 | $this->setName('migration:status') |
| 75 | - ->setDescription('Show current status of your migrations'); |
|
| 75 | + ->setDescription('Show current status of your migrations'); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -163,11 +163,11 @@ |
||
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | $data = [ |
| 166 | - 'id' => $user->id, |
|
| 167 | - 'username' => $user->username, |
|
| 168 | - 'lastname' => $user->lastname, |
|
| 169 | - 'firstname' => $user->firstname, |
|
| 170 | - 'permissions' => array_unique($permissions), |
|
| 166 | + 'id' => $user->id, |
|
| 167 | + 'username' => $user->username, |
|
| 168 | + 'lastname' => $user->lastname, |
|
| 169 | + 'firstname' => $user->firstname, |
|
| 170 | + 'permissions' => array_unique($permissions), |
|
| 171 | 171 | ]; |
| 172 | 172 | |
| 173 | 173 | $this->session->set('user', $data); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ) { |
| 83 | 83 | parent::__construct($app, $repository, $config, $filesystem); |
| 84 | 84 | $this->setName('migration:init') |
| 85 | - ->setDescription('Initialize the migration by creating migration table'); |
|
| 85 | + ->setDescription('Initialize the migration by creating migration table'); |
|
| 86 | 86 | |
| 87 | 87 | $this->schema = $schema; |
| 88 | 88 | } |
@@ -120,10 +120,10 @@ discard block |
||
| 120 | 120 | $tableName = $this->table; |
| 121 | 121 | $this->schema->create($tableName, function (CreateTable $table) { |
| 122 | 122 | $table->string('version', 20) |
| 123 | - ->description('The migration version') |
|
| 124 | - ->primary(); |
|
| 123 | + ->description('The migration version') |
|
| 124 | + ->primary(); |
|
| 125 | 125 | $table->string('description') |
| 126 | - ->description('The migration description'); |
|
| 126 | + ->description('The migration description'); |
|
| 127 | 127 | $table->datetime('created_at') |
| 128 | 128 | ->description('Migration run time'); |
| 129 | 129 | |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | protected string $name; |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * {@inheritdoc} |
|
| 30 | - */ |
|
| 29 | + * {@inheritdoc} |
|
| 30 | + */ |
|
| 31 | 31 | public function __construct(string $markup, &$tokens, Parser $parser) |
| 32 | 32 | { |
| 33 | 33 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |