@@ -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); |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | $this->template, |
| 117 | 117 | 'user/login', |
| 118 | 118 | [ |
| 119 | - 'param' => $formParam |
|
| 119 | + 'param' => $formParam |
|
| 120 | 120 | ] |
| 121 | 121 | ); |
| 122 | 122 | } |
@@ -109,10 +109,10 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | protected RouteHelper $routeHelper; |
| 111 | 111 | |
| 112 | - /** |
|
| 113 | - * The password hash to be used |
|
| 114 | - * @var HashInterface |
|
| 115 | - */ |
|
| 112 | + /** |
|
| 113 | + * The password hash to be used |
|
| 114 | + * @var HashInterface |
|
| 115 | + */ |
|
| 116 | 116 | protected HashInterface $hash; |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -217,9 +217,9 @@ discard block |
||
| 217 | 217 | $this->template, |
| 218 | 218 | 'user/edit', |
| 219 | 219 | [ |
| 220 | - 'param' => $formParam, |
|
| 221 | - 'status' => $statusList, |
|
| 222 | - 'roles' => $roles |
|
| 220 | + 'param' => $formParam, |
|
| 221 | + 'status' => $statusList, |
|
| 222 | + 'roles' => $roles |
|
| 223 | 223 | ] |
| 224 | 224 | ); |
| 225 | 225 | } |
@@ -262,9 +262,9 @@ discard block |
||
| 262 | 262 | $this->template, |
| 263 | 263 | 'user/edit', |
| 264 | 264 | [ |
| 265 | - 'param' => $formParam, |
|
| 266 | - 'status' => $statusList, |
|
| 267 | - 'roles' => $roles |
|
| 265 | + 'param' => $formParam, |
|
| 266 | + 'status' => $statusList, |
|
| 267 | + 'roles' => $roles |
|
| 268 | 268 | ] |
| 269 | 269 | ); |
| 270 | 270 | } |