@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public static function comment() |
13 | 13 | { |
14 | - return function ($value) { |
|
14 | + return function($value) { |
|
15 | 15 | $pattern = sprintf('/%s((.|\s)*?)%s/', '{#', '#}'); |
16 | 16 | |
17 | 17 | return preg_replace($pattern, '<?php /*$1*/ ?>', $value); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public static function script() |
27 | 27 | { |
28 | - return function ($value) { |
|
28 | + return function($value) { |
|
29 | 29 | $pattern = sprintf('/%s((.|\s)*?)%s/', '{@', '@}'); |
30 | 30 | |
31 | 31 | return preg_replace($pattern, '<?php $1; ?>', $value); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | if ($this->addon) { |
102 | 102 | $directories = $this->addon->config('addon.directories'); |
103 | 103 | |
104 | - if (! $directories) { |
|
104 | + if (!$directories) { |
|
105 | 105 | $directories = ['classes']; |
106 | 106 | } |
107 | 107 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $app['path.specs'] = $app->basePath().'/resources/specs'; |
42 | 42 | |
43 | 43 | // register spec repository |
44 | - $app->singleton('specs', function ($app) { |
|
44 | + $app->singleton('specs', function($app) { |
|
45 | 45 | $loader = new Repository\FileLoader($app['files'], $app['path.specs']); |
46 | 46 | |
47 | 47 | return new Repository\NamespacedRepository($loader); |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | $app->alias('addon', AddonEnvironment::class); |
53 | 53 | |
54 | 54 | // register addon generator |
55 | - $app->singleton('addon.generator', function ($app) { |
|
55 | + $app->singleton('addon.generator', function($app) { |
|
56 | 56 | return new AddonGenerator(); |
57 | 57 | }); |
58 | 58 | $app->alias('addon.generator', AddonGenerator::class); |
59 | 59 | |
60 | 60 | // register database migrator |
61 | - $app->singleton('database.migrator', function ($app) { |
|
61 | + $app->singleton('database.migrator', function($app) { |
|
62 | 62 | return new Migrator($app['db'], $app['config']); |
63 | 63 | }); |
64 | 64 | $app->alias('database.migrator', Migrator::class); |
@@ -97,7 +97,7 @@ |
||
97 | 97 | |
98 | 98 | return $generator->file($path)->template($this->getStub(), [ |
99 | 99 | 'namespace' => $namespace, |
100 | - 'root_namespace' => $this->getAppNamespace(), // use App\Events\{$event} |
|
100 | + 'root_namespace' => $this->getAppNamespace(), // use App\Events\{$event} |
|
101 | 101 | 'class' => $class, |
102 | 102 | 'event' => $this->option('event'), |
103 | 103 | ]); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | return $generator->file($path)->template($this->getStub(), [ |
83 | 83 | 'namespace' => $namespace, |
84 | - 'root_namespace' => $this->getAppNamespace(), // use App\Jobs\Job |
|
84 | + 'root_namespace' => $this->getAppNamespace(), // use App\Jobs\Job |
|
85 | 85 | 'class' => $class, |
86 | 86 | ]); |
87 | 87 | } |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | return $generator->file($path)->template($this->getStub(), [ |
82 | 82 | 'namespace' => $namespace, |
83 | - 'root_namespace' => $this->getAppNamespace(), // use App\Http\Requests\Request |
|
83 | + 'root_namespace' => $this->getAppNamespace(), // use App\Http\Requests\Request |
|
84 | 84 | 'class' => $class, |
85 | 85 | ]); |
86 | 86 | } |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | return $generator->file($path)->template($this->getStub(), [ |
82 | 82 | 'namespace' => $namespace, |
83 | - 'root_namespace' => $this->getAppNamespace(), // use App\Events\Event |
|
83 | + 'root_namespace' => $this->getAppNamespace(), // use App\Events\Event |
|
84 | 84 | 'class' => $class, |
85 | 85 | ]); |
86 | 86 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $lines = $this->option('lines'); |
98 | 98 | |
99 | - (new Process('tail -f -n '.$lines.' '.escapeshellarg($path)))->setTimeout(null)->run(function ($type, $line) use ($output) { |
|
99 | + (new Process('tail -f -n '.$lines.' '.escapeshellarg($path)))->setTimeout(null)->run(function($type, $line) use ($output) { |
|
100 | 100 | $output->write($line); |
101 | 101 | }); |
102 | 102 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | $lines = $this->option('lines'); |
160 | 160 | |
161 | - $this->getRemote($connection)->run('tail -f -n '.$lines.' '.escapeshellarg($path), function ($line) use ($out) { |
|
161 | + $this->getRemote($connection)->run('tail -f -n '.$lines.' '.escapeshellarg($path), function($line) use ($out) { |
|
162 | 162 | $out->write($line); |
163 | 163 | }); |
164 | 164 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | protected function registerRouteCommand($command) |
195 | 195 | { |
196 | - $this->app->singleton($command, function ($app) { |
|
196 | + $this->app->singleton($command, function($app) { |
|
197 | 197 | return new Commands\RouteListCommand($app); |
198 | 198 | }); |
199 | 199 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | protected function registerTailCommand($command) |
208 | 208 | { |
209 | - $this->app->singleton($command, function ($app) { |
|
209 | + $this->app->singleton($command, function($app) { |
|
210 | 210 | return new Commands\TailCommand($app); |
211 | 211 | }); |
212 | 212 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | */ |
220 | 220 | protected function registerAppContainerCommand($command) |
221 | 221 | { |
222 | - $this->app->singleton($command, function ($app) { |
|
222 | + $this->app->singleton($command, function($app) { |
|
223 | 223 | return new Commands\AppContainerCommand($app); |
224 | 224 | }); |
225 | 225 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | protected function registerAddonListCommand($command) |
234 | 234 | { |
235 | - $this->app->singleton($command, function ($app) { |
|
235 | + $this->app->singleton($command, function($app) { |
|
236 | 236 | return new Addons\Commands\AddonListCommand($app); |
237 | 237 | }); |
238 | 238 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | protected function registerAddonStatusCommand($command) |
247 | 247 | { |
248 | - $this->app->singleton($command, function ($app) { |
|
248 | + $this->app->singleton($command, function($app) { |
|
249 | 249 | return new Addons\Commands\AddonStatusCommand($app); |
250 | 250 | }); |
251 | 251 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | protected function registerAddonNameCommand($command) |
260 | 260 | { |
261 | - $this->app->singleton($command, function ($app) { |
|
261 | + $this->app->singleton($command, function($app) { |
|
262 | 262 | return new Addons\Commands\AddonNameCommand($app); |
263 | 263 | }); |
264 | 264 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | protected function registerAddonRemoveCommand($command) |
273 | 273 | { |
274 | - $this->app->singleton($command, function ($app) { |
|
274 | + $this->app->singleton($command, function($app) { |
|
275 | 275 | return new Addons\Commands\AddonRemoveCommand($app); |
276 | 276 | }); |
277 | 277 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | */ |
285 | 285 | protected function registerDatabaseStatusCommand($command) |
286 | 286 | { |
287 | - $this->app->singleton($command, function ($app) { |
|
287 | + $this->app->singleton($command, function($app) { |
|
288 | 288 | return new Database\Commands\DatabaseStatusCommand($app); |
289 | 289 | }); |
290 | 290 | } |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | protected function registerDatabaseUpgradeCommand($command) |
299 | 299 | { |
300 | - $this->app->singleton($command, function ($app) { |
|
300 | + $this->app->singleton($command, function($app) { |
|
301 | 301 | return new Database\Commands\DatabaseUpgradeCommand($app); |
302 | 302 | }); |
303 | 303 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function registerDatabaseCleanCommand($command) |
312 | 312 | { |
313 | - $this->app->singleton($command, function ($app) { |
|
313 | + $this->app->singleton($command, function($app) { |
|
314 | 314 | return new Database\Commands\DatabaseCleanCommand($app); |
315 | 315 | }); |
316 | 316 | } |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | */ |
324 | 324 | protected function registerDatabaseRefreshCommand($command) |
325 | 325 | { |
326 | - $this->app->singleton($command, function ($app) { |
|
326 | + $this->app->singleton($command, function($app) { |
|
327 | 327 | return new Database\Commands\DatabaseRefreshCommand($app); |
328 | 328 | }); |
329 | 329 | } |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | */ |
337 | 337 | protected function registerDatabaseRollbackCommand($command) |
338 | 338 | { |
339 | - $this->app->singleton($command, function ($app) { |
|
339 | + $this->app->singleton($command, function($app) { |
|
340 | 340 | return new Database\Commands\DatabaseRollbackCommand($app); |
341 | 341 | }); |
342 | 342 | } |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | */ |
350 | 350 | protected function registerDatabaseAgainCommand($command) |
351 | 351 | { |
352 | - $this->app->singleton($command, function ($app) { |
|
352 | + $this->app->singleton($command, function($app) { |
|
353 | 353 | return new Database\Commands\DatabaseAgainCommand($app); |
354 | 354 | }); |
355 | 355 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | */ |
363 | 363 | protected function registerDatabaseSeedCommand($command) |
364 | 364 | { |
365 | - $this->app->singleton($command, function ($app) { |
|
365 | + $this->app->singleton($command, function($app) { |
|
366 | 366 | return new Database\Commands\DatabaseSeedCommand($app); |
367 | 367 | }); |
368 | 368 | } |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | */ |
376 | 376 | protected function registerHashMakeCommand($command) |
377 | 377 | { |
378 | - $this->app->singleton($command, function ($app) { |
|
378 | + $this->app->singleton($command, function($app) { |
|
379 | 379 | return new Commands\HashMakeCommand($app); |
380 | 380 | }); |
381 | 381 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | */ |
389 | 389 | protected function registerHashCheckCommand($command) |
390 | 390 | { |
391 | - $this->app->singleton($command, function ($app) { |
|
391 | + $this->app->singleton($command, function($app) { |
|
392 | 392 | return new Commands\HashCheckCommand($app); |
393 | 393 | }); |
394 | 394 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | */ |
402 | 402 | protected function registerMakeAddonCommand($command) |
403 | 403 | { |
404 | - $this->app->singleton($command, function ($app) { |
|
404 | + $this->app->singleton($command, function($app) { |
|
405 | 405 | return new Addons\Commands\AddonMakeCommand($app); |
406 | 406 | }); |
407 | 407 | } |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | */ |
415 | 415 | protected function registerMakeCommandCommand($command) |
416 | 416 | { |
417 | - $this->app->singleton($command, function ($app) { |
|
417 | + $this->app->singleton($command, function($app) { |
|
418 | 418 | return new Generators\Commands\CommandMakeCommand($app); |
419 | 419 | }); |
420 | 420 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | */ |
428 | 428 | protected function registerMakeControllerCommand($command) |
429 | 429 | { |
430 | - $this->app->singleton($command, function ($app) { |
|
430 | + $this->app->singleton($command, function($app) { |
|
431 | 431 | return new Generators\Commands\ControllerMakeCommand($app); |
432 | 432 | }); |
433 | 433 | } |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | */ |
441 | 441 | protected function registerMakeEventCommand($command) |
442 | 442 | { |
443 | - $this->app->singleton($command, function ($app) { |
|
443 | + $this->app->singleton($command, function($app) { |
|
444 | 444 | return new Generators\Commands\EventMakeCommand($app); |
445 | 445 | }); |
446 | 446 | } |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | */ |
454 | 454 | protected function registerMakeJobCommand($command) |
455 | 455 | { |
456 | - $this->app->singleton($command, function ($app) { |
|
456 | + $this->app->singleton($command, function($app) { |
|
457 | 457 | return new Generators\Commands\JobMakeCommand($app); |
458 | 458 | }); |
459 | 459 | } |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | */ |
467 | 467 | protected function registerMakeListenerCommand($command) |
468 | 468 | { |
469 | - $this->app->singleton($command, function ($app) { |
|
469 | + $this->app->singleton($command, function($app) { |
|
470 | 470 | return new Generators\Commands\ListenerMakeCommand($app); |
471 | 471 | }); |
472 | 472 | } |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | */ |
480 | 480 | protected function registerMakeMailCommand($command) |
481 | 481 | { |
482 | - $this->app->singleton($command, function ($app) { |
|
482 | + $this->app->singleton($command, function($app) { |
|
483 | 483 | return new Generators\Commands\MailMakeCommand($app); |
484 | 484 | }); |
485 | 485 | } |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | */ |
494 | 494 | protected function registerMakeMiddlewareCommand($command) |
495 | 495 | { |
496 | - $this->app->singleton($command, function ($app) { |
|
496 | + $this->app->singleton($command, function($app) { |
|
497 | 497 | return new Generators\Commands\MiddlewareMakeCommand($app); |
498 | 498 | }); |
499 | 499 | } |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | */ |
507 | 507 | protected function registerMakeMigrationCommand($command) |
508 | 508 | { |
509 | - $this->app->singleton($command, function ($app) { |
|
509 | + $this->app->singleton($command, function($app) { |
|
510 | 510 | return new Database\Commands\MigrationMakeCommand($app); |
511 | 511 | }); |
512 | 512 | } |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | */ |
520 | 520 | protected function registerMakeModelCommand($command) |
521 | 521 | { |
522 | - $this->app->singleton($command, function ($app) { |
|
522 | + $this->app->singleton($command, function($app) { |
|
523 | 523 | return new Generators\Commands\ModelMakeCommand($app); |
524 | 524 | }); |
525 | 525 | } |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | */ |
533 | 533 | protected function registerMakeNotificationCommand($command) |
534 | 534 | { |
535 | - $this->app->singleton($command, function ($app) { |
|
535 | + $this->app->singleton($command, function($app) { |
|
536 | 536 | return new Generators\Commands\NotificationMakeCommand($app); |
537 | 537 | }); |
538 | 538 | } |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | */ |
546 | 546 | protected function registerMakePolicyCommand($command) |
547 | 547 | { |
548 | - $this->app->singleton($command, function ($app) { |
|
548 | + $this->app->singleton($command, function($app) { |
|
549 | 549 | return new Generators\Commands\PolicyMakeCommand($app); |
550 | 550 | }); |
551 | 551 | } |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | */ |
559 | 559 | protected function registerMakeProviderCommand($command) |
560 | 560 | { |
561 | - $this->app->singleton($command, function ($app) { |
|
561 | + $this->app->singleton($command, function($app) { |
|
562 | 562 | return new Generators\Commands\ProviderMakeCommand($app); |
563 | 563 | }); |
564 | 564 | } |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | */ |
572 | 572 | protected function registerMakeRequestCommand($command) |
573 | 573 | { |
574 | - $this->app->singleton($command, function ($app) { |
|
574 | + $this->app->singleton($command, function($app) { |
|
575 | 575 | return new Generators\Commands\RequestMakeCommand($app); |
576 | 576 | }); |
577 | 577 | } |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | */ |
585 | 585 | protected function registerMakeResourceCommand($command) |
586 | 586 | { |
587 | - $this->app->singleton($command, function ($app) { |
|
587 | + $this->app->singleton($command, function($app) { |
|
588 | 588 | return new Generators\Commands\ResourceMakeCommand($app); |
589 | 589 | }); |
590 | 590 | } |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | */ |
598 | 598 | protected function registerMakeRuleCommand($command) |
599 | 599 | { |
600 | - $this->app->singleton($command, function ($app) { |
|
600 | + $this->app->singleton($command, function($app) { |
|
601 | 601 | return new Generators\Commands\RuleMakeCommand($app); |
602 | 602 | }); |
603 | 603 | } |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | */ |
611 | 611 | protected function registerMakeSeederCommand($command) |
612 | 612 | { |
613 | - $this->app->singleton($command, function ($app) { |
|
613 | + $this->app->singleton($command, function($app) { |
|
614 | 614 | return new Database\Commands\SeederMakeCommand($app); |
615 | 615 | }); |
616 | 616 | } |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | */ |
624 | 624 | protected function registerMakeTestCommand($command) |
625 | 625 | { |
626 | - $this->app->singleton($command, function ($app) { |
|
626 | + $this->app->singleton($command, function($app) { |
|
627 | 627 | return new Generators\Commands\TestMakeCommand($app); |
628 | 628 | }); |
629 | 629 | } |