@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $this->template, |
88 | 88 | 'user/edit', |
89 | 89 | [ |
90 | - 'param' => $formParam |
|
90 | + 'param' => $formParam |
|
91 | 91 | ] |
92 | 92 | ); |
93 | 93 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->template, |
114 | 114 | 'user/edit', |
115 | 115 | [ |
116 | - 'param' => $formParam |
|
116 | + 'param' => $formParam |
|
117 | 117 | ] |
118 | 118 | ); |
119 | 119 | } |
@@ -22,8 +22,7 @@ |
||
22 | 22 | * |
23 | 23 | * @author tony |
24 | 24 | */ |
25 | -class EditAction implements RequestHandlerInterface |
|
26 | -{ |
|
25 | +class EditAction implements RequestHandlerInterface { |
|
27 | 26 | |
28 | 27 | protected LoggerInterface $logger; |
29 | 28 | protected Session $session; |
@@ -16,8 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @author tony |
18 | 18 | */ |
19 | -class DeleteAction implements RequestHandlerInterface |
|
20 | -{ |
|
19 | +class DeleteAction implements RequestHandlerInterface { |
|
21 | 20 | |
22 | 21 | protected LoggerInterface $logger; |
23 | 22 | protected UserRepository $userRepository; |
@@ -4,8 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Platine\Orm\Entity; |
6 | 6 | |
7 | -class UserParam extends BaseParam |
|
8 | -{ |
|
7 | +class UserParam extends BaseParam { |
|
9 | 8 | protected string $username = ''; |
10 | 9 | protected string $lastname = ''; |
11 | 10 | protected string $firstname = ''; |
@@ -11,15 +11,13 @@ discard block |
||
11 | 11 | use Platine\Orm\Entity; |
12 | 12 | use Platine\Stdlib\Helper\Str; |
13 | 13 | |
14 | -class BaseParam |
|
15 | -{ |
|
14 | +class BaseParam { |
|
16 | 15 | |
17 | 16 | /** |
18 | 17 | * Create new instance |
19 | 18 | * @param array<string, mixed> $data |
20 | 19 | */ |
21 | - public function __construct(array $data = []) |
|
22 | - { |
|
20 | + public function __construct(array $data = []) { |
|
23 | 21 | $params = array_merge($this->getDefault(), $data); |
24 | 22 | $this->load($params); |
25 | 23 | } |
@@ -62,8 +60,7 @@ discard block |
||
62 | 60 | * @param string $name |
63 | 61 | * @return mixed|null |
64 | 62 | */ |
65 | - public function __get($name) |
|
66 | - { |
|
63 | + public function __get($name) { |
|
67 | 64 | if (property_exists($this, $name)) { |
68 | 65 | return $this->{$name}; |
69 | 66 | } |
@@ -58,8 +58,7 @@ |
||
58 | 58 | * class MigrationServiceProvider |
59 | 59 | * @package Platine\Framework\Service\Provider |
60 | 60 | */ |
61 | -class MigrationServiceProvider extends ServiceProvider |
|
62 | -{ |
|
61 | +class MigrationServiceProvider extends ServiceProvider { |
|
63 | 62 | |
64 | 63 | /** |
65 | 64 | * {@inheritdoc} |
@@ -159,26 +159,3 @@ |
||
159 | 159 | private function getTemplateClass(): string |
160 | 160 | { |
161 | 161 | return <<<EOF |
162 | - <?php |
|
163 | - namespace Platine\Framework\Migration; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\AbstractMigration; |
|
166 | - |
|
167 | - class %classname% extends AbstractMigration |
|
168 | - { |
|
169 | - |
|
170 | - public function up(): void |
|
171 | - { |
|
172 | - //Action when migrate up |
|
173 | - |
|
174 | - } |
|
175 | - |
|
176 | - public function down(): void |
|
177 | - { |
|
178 | - //Action when migrate down |
|
179 | - |
|
180 | - } |
|
181 | - } |
|
182 | - EOF; |
|
183 | - } |
|
184 | -} |
@@ -159,26 +159,3 @@ |
||
159 | 159 | private function getTemplateClass(): string |
160 | 160 | { |
161 | 161 | return <<<EOF |
162 | - <?php |
|
163 | - namespace Platine\Framework\Migration; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\AbstractMigration; |
|
166 | - |
|
167 | - class %classname% extends AbstractMigration |
|
168 | - { |
|
169 | - |
|
170 | - public function up(): void |
|
171 | - { |
|
172 | - //Action when migrate up |
|
173 | - |
|
174 | - } |
|
175 | - |
|
176 | - public function down(): void |
|
177 | - { |
|
178 | - //Action when migrate down |
|
179 | - |
|
180 | - } |
|
181 | - } |
|
182 | - EOF; |
|
183 | - } |
|
184 | -} |
@@ -159,26 +159,3 @@ |
||
159 | 159 | private function getTemplateClass(): string |
160 | 160 | { |
161 | 161 | return <<<EOF |
162 | - <?php |
|
163 | - namespace Platine\Framework\Migration; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\AbstractMigration; |
|
166 | - |
|
167 | - class %classname% extends AbstractMigration |
|
168 | - { |
|
169 | - |
|
170 | - public function up(): void |
|
171 | - { |
|
172 | - //Action when migrate up |
|
173 | - |
|
174 | - } |
|
175 | - |
|
176 | - public function down(): void |
|
177 | - { |
|
178 | - //Action when migrate down |
|
179 | - |
|
180 | - } |
|
181 | - } |
|
182 | - EOF; |
|
183 | - } |
|
184 | -} |
@@ -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 | -} |
@@ -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 AbstractMigration |
54 | 54 | * @package Platine\Framework\Migration |
55 | 55 | */ |
56 | -abstract class AbstractMigration extends Schema |
|
57 | -{ |
|
56 | +abstract class AbstractMigration extends Schema { |
|
58 | 57 | /** |
59 | 58 | * Execute when do migrate |
60 | 59 | * @return void |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * class MigrationEntity |
57 | 57 | * @package Platine\Framework\Migration |
58 | 58 | */ |
59 | -class MigrationEntity extends Entity |
|
60 | -{ |
|
59 | +class MigrationEntity extends Entity { |
|
61 | 60 | |
62 | 61 | /** |
63 | 62 | * {@inheritdoc} |
@@ -54,15 +54,13 @@ |
||
54 | 54 | * class MigrationRepository |
55 | 55 | * @package Platine\Framework\Migration |
56 | 56 | */ |
57 | -class MigrationRepository extends Repository |
|
58 | -{ |
|
57 | +class MigrationRepository extends Repository { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * Create new instance |
62 | 61 | * @param EntityManager $manager |
63 | 62 | */ |
64 | - public function __construct(EntityManager $manager) |
|
65 | - { |
|
63 | + public function __construct(EntityManager $manager) { |
|
66 | 64 | parent::__construct($manager, MigrationEntity::class); |
67 | 65 | } |
68 | 66 | } |