@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @package Platine\Framework\Console\Command |
62 | 62 | * @template T |
63 | 63 | */ |
64 | -class VendorPublishCommand extends Command |
|
65 | -{ |
|
64 | +class VendorPublishCommand extends Command { |
|
66 | 65 | /** |
67 | 66 | * Application instance |
68 | 67 | * @var Application |
@@ -130,8 +129,7 @@ discard block |
||
130 | 129 | /** |
131 | 130 | * {@inheritdoc} |
132 | 131 | */ |
133 | - public function execute() |
|
134 | - { |
|
132 | + public function execute() { |
|
135 | 133 | $writer = $this->io()->writer(); |
136 | 134 | $name = $this->getArgumentValue('name'); |
137 | 135 | $writer->boldGreen(sprintf('PUBLISH OF PACKAGE [%s]', $name), true)->eol(); |
@@ -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); |
@@ -91,8 +89,7 @@ discard block |
||
91 | 89 | /** |
92 | 90 | * {@inheritdoc} |
93 | 91 | */ |
94 | - public function execute() |
|
95 | - { |
|
92 | + public function execute() { |
|
96 | 93 | if ($this->getOptionValue('list')) { |
97 | 94 | $this->showRouteList(); |
98 | 95 | } |
@@ -571,8 +571,4 @@ |
||
571 | 571 | protected function getUsesTemplate(string $className): string |
572 | 572 | { |
573 | 573 | return <<<EOF |
574 | - use $className; |
|
575 | - |
|
576 | - EOF; |
|
577 | - } |
|
578 | -} |
|
574 | + use $className |
|
579 | 575 | \ No newline at end of file |
@@ -571,8 +571,4 @@ |
||
571 | 571 | protected function getUsesTemplate(string $className): string |
572 | 572 | { |
573 | 573 | return <<<EOF |
574 | - use $className; |
|
575 | - |
|
576 | - EOF; |
|
577 | - } |
|
578 | -} |
|
574 | + use $className |
|
579 | 575 | \ No newline at end of file |
@@ -571,8 +571,4 @@ |
||
571 | 571 | protected function getUsesTemplate(string $className): string |
572 | 572 | { |
573 | 573 | return <<<EOF |
574 | - use $className; |
|
575 | - |
|
576 | - EOF; |
|
577 | - } |
|
578 | -} |
|
574 | + use $className |
|
579 | 575 | \ No newline at end of file |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class MakeCommand |
60 | 60 | * @package Platine\Framework\Console |
61 | 61 | */ |
62 | -abstract class MakeCommand extends Command |
|
63 | -{ |
|
62 | +abstract class MakeCommand extends Command { |
|
64 | 63 | /** |
65 | 64 | * The Application instance |
66 | 65 | * @var Application |
@@ -117,8 +116,7 @@ discard block |
||
117 | 116 | /** |
118 | 117 | * {@inheritdoc} |
119 | 118 | */ |
120 | - public function execute() |
|
121 | - { |
|
119 | + public function execute() { |
|
122 | 120 | $io = $this->io(); |
123 | 121 | $writer = $io->writer(); |
124 | 122 | $name = $this->className; |
@@ -571,8 +569,4 @@ discard block |
||
571 | 569 | protected function getUsesTemplate(string $className): string |
572 | 570 | { |
573 | 571 | return <<<EOF |
574 | - use $className; |
|
575 | - |
|
576 | - EOF; |
|
577 | - } |
|
578 | -} |
|
572 | + use $className |
|
579 | 573 | \ No newline at end of file |
@@ -571,8 +571,4 @@ |
||
571 | 571 | protected function getUsesTemplate(string $className): string |
572 | 572 | { |
573 | 573 | return <<<EOF |
574 | - use $className; |
|
575 | - |
|
576 | - EOF; |
|
577 | - } |
|
578 | -} |
|
574 | + use $className |
|
579 | 575 | \ No newline at end of file |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @package Platine\Framework\Kernel |
59 | 59 | * @template T |
60 | 60 | */ |
61 | -class ConsoleKernel extends BaseKernel |
|
62 | -{ |
|
61 | +class ConsoleKernel extends BaseKernel { |
|
63 | 62 | /** |
64 | 63 | * Console application instance |
65 | 64 | * @var ConsoleApp |
@@ -83,8 +82,7 @@ discard block |
||
83 | 82 | * @param Application $app |
84 | 83 | * @param ConsoleApp $console |
85 | 84 | */ |
86 | - public function __construct(Application $app, ConsoleApp $console) |
|
87 | - { |
|
85 | + public function __construct(Application $app, ConsoleApp $console) { |
|
88 | 86 | parent::__construct($app); |
89 | 87 | $this->console = $console; |
90 | 88 | } |
@@ -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 | * Create new instance |
65 | 64 | * {@inheritdoc} |
@@ -78,8 +77,7 @@ discard block |
||
78 | 77 | /** |
79 | 78 | * {@inheritdoc} |
80 | 79 | */ |
81 | - public function execute() |
|
82 | - { |
|
80 | + public function execute() { |
|
83 | 81 | $io = $this->io(); |
84 | 82 | $writer = $io->writer(); |
85 | 83 | $writer->boldYellow('MIGRATION UPGRADE TO LATEST', true)->eol(); |
@@ -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 | * The migration name |
68 | 67 | * @var string |
@@ -89,8 +88,7 @@ discard block |
||
89 | 88 | /** |
90 | 89 | * {@inheritdoc} |
91 | 90 | */ |
92 | - public function execute() |
|
93 | - { |
|
91 | + public function execute() { |
|
94 | 92 | $writer = $this->io()->writer(); |
95 | 93 | |
96 | 94 | $version = date('Ymd_His'); |
@@ -160,28 +158,3 @@ discard block |
||
160 | 158 | private function getTemplateClass(): string |
161 | 159 | { |
162 | 160 | return <<<EOF |
163 | - <?php |
|
164 | - declare(strict_types=1); |
|
165 | - |
|
166 | - namespace Platine\Framework\Migration; |
|
167 | - |
|
168 | - use Platine\Framework\Migration\AbstractMigration; |
|
169 | - |
|
170 | - class %classname% extends AbstractMigration |
|
171 | - { |
|
172 | - |
|
173 | - public function up(): void |
|
174 | - { |
|
175 | - //Action when migrate up |
|
176 | - |
|
177 | - } |
|
178 | - |
|
179 | - public function down(): void |
|
180 | - { |
|
181 | - //Action when migrate down |
|
182 | - |
|
183 | - } |
|
184 | - } |
|
185 | - EOF; |
|
186 | - } |
|
187 | -} |
@@ -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 | * The schema to use |
67 | 66 | * @var Schema |
@@ -89,8 +88,7 @@ discard block |
||
89 | 88 | /** |
90 | 89 | * {@inheritdoc} |
91 | 90 | */ |
92 | - public function execute() |
|
93 | - { |
|
91 | + public function execute() { |
|
94 | 92 | $io = $this->io(); |
95 | 93 | $writer = $io->writer(); |
96 | 94 | $writer->boldYellow('MIGRATION INITIALIZATION', true); |
@@ -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 | * Create new instance |
66 | 65 | * {@inheritdoc} |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | /** |
80 | 79 | * {@inheritdoc} |
81 | 80 | */ |
82 | - public function execute() |
|
83 | - { |
|
81 | + public function execute() { |
|
84 | 82 | $writer = $this->io()->writer(); |
85 | 83 | $writer->boldYellow('MIGRATION STATUS', true)->eol(); |
86 | 84 | $writer->bold('Migration path: '); |
@@ -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 | * Create new instance |
65 | 64 | * {@inheritdoc} |
@@ -78,8 +77,7 @@ discard block |
||
78 | 77 | /** |
79 | 78 | * {@inheritdoc} |
80 | 79 | */ |
81 | - public function execute() |
|
82 | - { |
|
80 | + public function execute() { |
|
83 | 81 | $io = $this->io(); |
84 | 82 | $writer = $io->writer(); |
85 | 83 | $writer->boldYellow('ALL MIGRATION ROLLBACK', true)->eol(); |