@@ -71,7 +71,7 @@ |
||
71 | 71 | ) { |
72 | 72 | parent::__construct($app, $config, $filesystem); |
73 | 73 | $this->setName('seed:status') |
74 | - ->setDescription('Show your database seeds status'); |
|
74 | + ->setDescription('Show your database seeds status'); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @template T |
58 | 58 | * @extends AbstractSeedCommand<T> |
59 | 59 | */ |
60 | -class SeedStatusCommand extends AbstractSeedCommand |
|
61 | -{ |
|
60 | +class SeedStatusCommand extends AbstractSeedCommand { |
|
62 | 61 | |
63 | 62 | /** |
64 | 63 | * Create new instance |
@@ -77,8 +76,7 @@ discard block |
||
77 | 76 | /** |
78 | 77 | * {@inheritodc} |
79 | 78 | */ |
80 | - public function execute() |
|
81 | - { |
|
79 | + public function execute() { |
|
82 | 80 | $writer = $this->io()->writer(); |
83 | 81 | $writer->boldYellow('SEED STATUS', true)->eol(); |
84 | 82 | $writer->bold('Seed path: '); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ) { |
82 | 82 | parent::__construct($app, $config, $filesystem); |
83 | 83 | $this->setName('seed:create') |
84 | - ->setDescription('Create a new seed'); |
|
84 | + ->setDescription('Create a new seed'); |
|
85 | 85 | |
86 | 86 | $this->addArgument('name', 'name of seed', null, false, true); |
87 | 87 | } |
@@ -157,22 +157,3 @@ discard block |
||
157 | 157 | private function getTemplateClass(): string |
158 | 158 | { |
159 | 159 | return <<<EOF |
160 | - <?php |
|
161 | - declare(strict_types=1); |
|
162 | - |
|
163 | - namespace Platine\Framework\Migration\Seed; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\Seed\AbstractSeed; |
|
166 | - |
|
167 | - class %classname% extends AbstractSeed |
|
168 | - { |
|
169 | - |
|
170 | - public function run(): void |
|
171 | - { |
|
172 | - //Action when run the seed |
|
173 | - |
|
174 | - } |
|
175 | - } |
|
176 | - EOF; |
|
177 | - } |
|
178 | -} |
@@ -157,22 +157,3 @@ |
||
157 | 157 | private function getTemplateClass(): string |
158 | 158 | { |
159 | 159 | return <<<EOF |
160 | - <?php |
|
161 | - declare(strict_types=1); |
|
162 | - |
|
163 | - namespace Platine\Framework\Migration\Seed; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\Seed\AbstractSeed; |
|
166 | - |
|
167 | - class %classname% extends AbstractSeed |
|
168 | - { |
|
169 | - |
|
170 | - public function run(): void |
|
171 | - { |
|
172 | - //Action when run the seed |
|
173 | - |
|
174 | - } |
|
175 | - } |
|
176 | - EOF; |
|
177 | - } |
|
178 | -} |
@@ -157,22 +157,3 @@ |
||
157 | 157 | private function getTemplateClass(): string |
158 | 158 | { |
159 | 159 | return <<<EOF |
160 | - <?php |
|
161 | - declare(strict_types=1); |
|
162 | - |
|
163 | - namespace Platine\Framework\Migration\Seed; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\Seed\AbstractSeed; |
|
166 | - |
|
167 | - class %classname% extends AbstractSeed |
|
168 | - { |
|
169 | - |
|
170 | - public function run(): void |
|
171 | - { |
|
172 | - //Action when run the seed |
|
173 | - |
|
174 | - } |
|
175 | - } |
|
176 | - EOF; |
|
177 | - } |
|
178 | -} |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @template T |
62 | 62 | * @extends AbstractSeedCommand<T> |
63 | 63 | */ |
64 | -class SeedCreateCommand extends AbstractSeedCommand |
|
65 | -{ |
|
64 | +class SeedCreateCommand extends AbstractSeedCommand { |
|
66 | 65 | |
67 | 66 | /** |
68 | 67 | * The seed name |
@@ -89,8 +88,7 @@ discard block |
||
89 | 88 | /** |
90 | 89 | * {@inheritodc} |
91 | 90 | */ |
92 | - public function execute() |
|
93 | - { |
|
91 | + public function execute() { |
|
94 | 92 | $writer = $this->io()->writer(); |
95 | 93 | |
96 | 94 | $className = $this->getSeedClassName($this->name); |
@@ -157,22 +155,3 @@ discard block |
||
157 | 155 | private function getTemplateClass(): string |
158 | 156 | { |
159 | 157 | return <<<EOF |
160 | - <?php |
|
161 | - declare(strict_types=1); |
|
162 | - |
|
163 | - namespace Platine\Framework\Migration\Seed; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\Seed\AbstractSeed; |
|
166 | - |
|
167 | - class %classname% extends AbstractSeed |
|
168 | - { |
|
169 | - |
|
170 | - public function run(): void |
|
171 | - { |
|
172 | - //Action when run the seed |
|
173 | - |
|
174 | - } |
|
175 | - } |
|
176 | - EOF; |
|
177 | - } |
|
178 | -} |
@@ -157,22 +157,3 @@ |
||
157 | 157 | private function getTemplateClass(): string |
158 | 158 | { |
159 | 159 | return <<<EOF |
160 | - <?php |
|
161 | - declare(strict_types=1); |
|
162 | - |
|
163 | - namespace Platine\Framework\Migration\Seed; |
|
164 | - |
|
165 | - use Platine\Framework\Migration\Seed\AbstractSeed; |
|
166 | - |
|
167 | - class %classname% extends AbstractSeed |
|
168 | - { |
|
169 | - |
|
170 | - public function run(): void |
|
171 | - { |
|
172 | - //Action when run the seed |
|
173 | - |
|
174 | - } |
|
175 | - } |
|
176 | - EOF; |
|
177 | - } |
|
178 | -} |
@@ -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,28 +161,3 @@ discard block |
||
161 | 161 | private function getTemplateClass(): string |
162 | 162 | { |
163 | 163 | return <<<EOF |
164 | - <?php |
|
165 | - declare(strict_types=1); |
|
166 | - |
|
167 | - namespace Platine\Framework\Migration; |
|
168 | - |
|
169 | - use Platine\Framework\Migration\AbstractMigration; |
|
170 | - |
|
171 | - class %classname% extends AbstractMigration |
|
172 | - { |
|
173 | - |
|
174 | - public function up(): void |
|
175 | - { |
|
176 | - //Action when migrate up |
|
177 | - |
|
178 | - } |
|
179 | - |
|
180 | - public function down(): void |
|
181 | - { |
|
182 | - //Action when migrate down |
|
183 | - |
|
184 | - } |
|
185 | - } |
|
186 | - EOF; |
|
187 | - } |
|
188 | -} |
@@ -161,28 +161,3 @@ |
||
161 | 161 | private function getTemplateClass(): string |
162 | 162 | { |
163 | 163 | return <<<EOF |
164 | - <?php |
|
165 | - declare(strict_types=1); |
|
166 | - |
|
167 | - namespace Platine\Framework\Migration; |
|
168 | - |
|
169 | - use Platine\Framework\Migration\AbstractMigration; |
|
170 | - |
|
171 | - class %classname% extends AbstractMigration |
|
172 | - { |
|
173 | - |
|
174 | - public function up(): void |
|
175 | - { |
|
176 | - //Action when migrate up |
|
177 | - |
|
178 | - } |
|
179 | - |
|
180 | - public function down(): void |
|
181 | - { |
|
182 | - //Action when migrate down |
|
183 | - |
|
184 | - } |
|
185 | - } |
|
186 | - EOF; |
|
187 | - } |
|
188 | -} |
@@ -161,28 +161,3 @@ |
||
161 | 161 | private function getTemplateClass(): string |
162 | 162 | { |
163 | 163 | return <<<EOF |
164 | - <?php |
|
165 | - declare(strict_types=1); |
|
166 | - |
|
167 | - namespace Platine\Framework\Migration; |
|
168 | - |
|
169 | - use Platine\Framework\Migration\AbstractMigration; |
|
170 | - |
|
171 | - class %classname% extends AbstractMigration |
|
172 | - { |
|
173 | - |
|
174 | - public function up(): void |
|
175 | - { |
|
176 | - //Action when migrate up |
|
177 | - |
|
178 | - } |
|
179 | - |
|
180 | - public function down(): void |
|
181 | - { |
|
182 | - //Action when migrate down |
|
183 | - |
|
184 | - } |
|
185 | - } |
|
186 | - EOF; |
|
187 | - } |
|
188 | -} |
@@ -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,28 +159,3 @@ discard block |
||
161 | 159 | private function getTemplateClass(): string |
162 | 160 | { |
163 | 161 | return <<<EOF |
164 | - <?php |
|
165 | - declare(strict_types=1); |
|
166 | - |
|
167 | - namespace Platine\Framework\Migration; |
|
168 | - |
|
169 | - use Platine\Framework\Migration\AbstractMigration; |
|
170 | - |
|
171 | - class %classname% extends AbstractMigration |
|
172 | - { |
|
173 | - |
|
174 | - public function up(): void |
|
175 | - { |
|
176 | - //Action when migrate up |
|
177 | - |
|
178 | - } |
|
179 | - |
|
180 | - public function down(): void |
|
181 | - { |
|
182 | - //Action when migrate down |
|
183 | - |
|
184 | - } |
|
185 | - } |
|
186 | - EOF; |
|
187 | - } |
|
188 | -} |
@@ -161,28 +161,3 @@ |
||
161 | 161 | private function getTemplateClass(): string |
162 | 162 | { |
163 | 163 | return <<<EOF |
164 | - <?php |
|
165 | - declare(strict_types=1); |
|
166 | - |
|
167 | - namespace Platine\Framework\Migration; |
|
168 | - |
|
169 | - use Platine\Framework\Migration\AbstractMigration; |
|
170 | - |
|
171 | - class %classname% extends AbstractMigration |
|
172 | - { |
|
173 | - |
|
174 | - public function up(): void |
|
175 | - { |
|
176 | - //Action when migrate up |
|
177 | - |
|
178 | - } |
|
179 | - |
|
180 | - public function down(): void |
|
181 | - { |
|
182 | - //Action when migrate down |
|
183 | - |
|
184 | - } |
|
185 | - } |
|
186 | - EOF; |
|
187 | - } |
|
188 | -} |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $this->queryBuilder = $queryBuilder; |
107 | 107 | |
108 | 108 | $this->setName('seed:createdb') |
109 | - ->setDescription('Create a new seed using existing data'); |
|
109 | + ->setDescription('Create a new seed using existing data'); |
|
110 | 110 | |
111 | 111 | $this->addArgument('table', 'name of the table', null, true, false); |
112 | 112 | $this->addArgument('name', 'name of seed', null, false, true); |
@@ -257,6 +257,4 @@ discard block |
||
257 | 257 | ); |
258 | 258 | $export = join(PHP_EOL, array_filter(['['] + $array)); |
259 | 259 | |
260 | - return $export; |
|
261 | - } |
|
262 | -} |
|
260 | + return $export |
|
263 | 261 | \ No newline at end of file |
@@ -257,6 +257,4 @@ |
||
257 | 257 | ); |
258 | 258 | $export = join(PHP_EOL, array_filter(['['] + $array)); |
259 | 259 | |
260 | - return $export; |
|
261 | - } |
|
262 | -} |
|
260 | + return $export |
|
263 | 261 | \ No newline at end of file |
@@ -257,6 +257,4 @@ |
||
257 | 257 | ); |
258 | 258 | $export = join(PHP_EOL, array_filter(['['] + $array)); |
259 | 259 | |
260 | - return $export; |
|
261 | - } |
|
262 | -} |
|
260 | + return $export |
|
263 | 261 | \ No newline at end of file |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | * @template T |
64 | 64 | * @extends AbstractSeedCommand<T> |
65 | 65 | */ |
66 | -class SeedCreateDbCommand extends AbstractSeedCommand |
|
67 | -{ |
|
66 | +class SeedCreateDbCommand extends AbstractSeedCommand { |
|
68 | 67 | |
69 | 68 | /** |
70 | 69 | * The seed name |
@@ -115,8 +114,7 @@ discard block |
||
115 | 114 | /** |
116 | 115 | * {@inheritodc} |
117 | 116 | */ |
118 | - public function execute() |
|
119 | - { |
|
117 | + public function execute() { |
|
120 | 118 | $writer = $this->io()->writer(); |
121 | 119 | |
122 | 120 | $this->table = $this->getArgumentValue('table'); |
@@ -257,6 +255,4 @@ discard block |
||
257 | 255 | ); |
258 | 256 | $export = join(PHP_EOL, array_filter(['['] + $array)); |
259 | 257 | |
260 | - return $export; |
|
261 | - } |
|
262 | -} |
|
258 | + return $export |
|
263 | 259 | \ No newline at end of file |
@@ -257,6 +257,4 @@ |
||
257 | 257 | ); |
258 | 258 | $export = join(PHP_EOL, array_filter(['['] + $array)); |
259 | 259 | |
260 | - return $export; |
|
261 | - } |
|
262 | -} |
|
260 | + return $export |
|
263 | 261 | \ No newline at end of file |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * @class FilesystemServiceProvider |
57 | 57 | * @package Platine\Framework\Service\Provider |
58 | 58 | */ |
59 | -class FilesystemServiceProvider extends ServiceProvider |
|
60 | -{ |
|
59 | +class FilesystemServiceProvider extends ServiceProvider { |
|
61 | 60 | |
62 | 61 | /** |
63 | 62 | * {@inheritdoc} |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class RequestData |
55 | 55 | * @package Platine\Framework\Http |
56 | 56 | */ |
57 | -class RequestData |
|
58 | -{ |
|
57 | +class RequestData { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * The request body or post data |
@@ -97,8 +96,7 @@ discard block |
||
97 | 96 | * Create new instance |
98 | 97 | * @param ServerRequestInterface $request |
99 | 98 | */ |
100 | - public function __construct(ServerRequestInterface $request) |
|
101 | - { |
|
99 | + public function __construct(ServerRequestInterface $request) { |
|
102 | 100 | $this->posts = (array) $request->getParsedBody(); |
103 | 101 | $this->gets = $request->getQueryParams(); |
104 | 102 | $this->servers = $request->getServerParams(); |
@@ -170,8 +168,7 @@ discard block |
||
170 | 168 | * |
171 | 169 | * @return mixed |
172 | 170 | */ |
173 | - public function get(string $key, $default = null) |
|
174 | - { |
|
171 | + public function get(string $key, $default = null) { |
|
175 | 172 | $gets = $this->applyInputClean($this->gets); |
176 | 173 | return Arr::get($gets, $key, $default); |
177 | 174 | } |
@@ -183,8 +180,7 @@ discard block |
||
183 | 180 | * |
184 | 181 | * @return mixed |
185 | 182 | */ |
186 | - public function post(string $key, $default = null) |
|
187 | - { |
|
183 | + public function post(string $key, $default = null) { |
|
188 | 184 | $posts = $this->applyInputClean($this->posts); |
189 | 185 | return Arr::get($posts, $key, $default); |
190 | 186 | } |
@@ -196,8 +192,7 @@ discard block |
||
196 | 192 | * |
197 | 193 | * @return mixed |
198 | 194 | */ |
199 | - public function server(string $key, $default = null) |
|
200 | - { |
|
195 | + public function server(string $key, $default = null) { |
|
201 | 196 | $servers = $this->applyInputClean($this->servers); |
202 | 197 | return Arr::get($servers, $key, $default); |
203 | 198 | } |
@@ -209,8 +204,7 @@ discard block |
||
209 | 204 | * |
210 | 205 | * @return mixed |
211 | 206 | */ |
212 | - public function cookie(string $key, $default = null) |
|
213 | - { |
|
207 | + public function cookie(string $key, $default = null) { |
|
214 | 208 | $cookies = $this->applyInputClean($this->cookies); |
215 | 209 | return Arr::get($cookies, $key, $default); |
216 | 210 | } |
@@ -221,8 +215,7 @@ discard block |
||
221 | 215 | * |
222 | 216 | * @return mixed |
223 | 217 | */ |
224 | - public function file(string $key) |
|
225 | - { |
|
218 | + public function file(string $key) { |
|
226 | 219 | $files = $this->files; |
227 | 220 | return Arr::get($files, $key, null); |
228 | 221 | } |
@@ -232,8 +225,7 @@ discard block |
||
232 | 225 | * @param mixed $str |
233 | 226 | * @return mixed |
234 | 227 | */ |
235 | - protected function cleanInput($str) |
|
236 | - { |
|
228 | + protected function cleanInput($str) { |
|
237 | 229 | if (is_array($str)) { |
238 | 230 | return array_map([$this, 'cleanInput'], $str); |
239 | 231 | } |