Completed
Pull Request — master (#1905)
by Solomon
08:28
created
src/Commands/Make/HelperMakeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@
 block discarded – undo
54 54
         ];
55 55
     }
56 56
 
57
-    protected function getHelperName(): array|string
57
+    protected function getHelperName(): array | string
58 58
     {
59 59
         return Str::studly($this->argument('name'));
60 60
     }
61 61
 
62
-    private function getClassNameWithoutNamespace(): array|string
62
+    private function getClassNameWithoutNamespace(): array | string
63 63
     {
64 64
         return class_basename($this->getHelperName());
65 65
     }
Please login to merge, or discard this patch.
src/Commands/Database/MigrateResetCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
         $database = $this->option('database');
35 35
 
36
-        if (! empty($database)) {
36
+        if (!empty($database)) {
37 37
             $migrator->setDatabase($database);
38 38
         }
39 39
 
Please login to merge, or discard this patch.
src/Commands/Database/SeedCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $module = $this->getModuleModel($name);
37 37
 
38
-        $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
38
+        $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
39 39
             try {
40 40
                 $this->moduleSeed($module);
41 41
             } catch (\Error $e) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function getModuleRepository(): RepositoryInterface
65 65
     {
66 66
         $modules = $this->laravel['modules'];
67
-        if (! $modules instanceof RepositoryInterface) {
67
+        if (!$modules instanceof RepositoryInterface) {
68 68
             throw new RuntimeException('Module repository not found!');
69 69
         }
70 70
 
Please login to merge, or discard this patch.
src/Commands/Database/MigrateRefreshCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $module = $this->getModuleModel($name);
27 27
 
28
-        $this->components->task("Refreshing Migration {$module->getName()} module", function () use ($module) {
28
+        $this->components->task("Refreshing Migration {$module->getName()} module", function() use ($module) {
29 29
             $this->call('module:migrate-reset', [
30 30
                 'module' => $module->getStudlyName(),
31 31
                 '--database' => $this->option('database'),
Please login to merge, or discard this patch.
src/FileRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $paths = array_merge($paths, $this->config('scan.paths'));
116 116
         }
117 117
 
118
-        $paths = array_map(function ($path) {
118
+        $paths = array_map(function($path) {
119 119
             return Str::endsWith($path, '/*') ? $path : Str::finish($path, '/*');
120 120
         }, $paths);
121 121
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function all(): array
165 165
     {
166
-        if (! $this->config('cache.enabled')) {
166
+        if (!$this->config('cache.enabled')) {
167 167
             return $this->scan();
168 168
         }
169 169
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      */
197 197
     public function getCached()
198 198
     {
199
-        return $this->cache->store($this->config->get('modules.cache.driver'))->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
199
+        return $this->cache->store($this->config->get('modules.cache.driver'))->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
200 200
             return $this->toCollection()->toArray();
201 201
         });
202 202
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     {
268 268
         $modules = $this->allEnabled();
269 269
 
270
-        uasort($modules, function (Module $a, Module $b) use ($direction) {
270
+        uasort($modules, function(Module $a, Module $b) use ($direction) {
271 271
             if ($a->get('priority') === $b->get('priority')) {
272 272
                 return 0;
273 273
             }
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         }
393 393
 
394 394
         $path = storage_path('app/modules/modules.used');
395
-        if (! $this->getFiles()->exists($path)) {
395
+        if (!$this->getFiles()->exists($path)) {
396 396
             $this->getFiles()->put($path, '');
397 397
         }
398 398
 
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
      */
483 483
     public function isDisabled(string $name): bool
484 484
     {
485
-        return ! $this->isEnabled($name);
485
+        return !$this->isEnabled($name);
486 486
     }
487 487
 
488 488
     /**
Please login to merge, or discard this patch.
src/LumenModulesServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
      */
43 43
     protected function registerServices()
44 44
     {
45
-        $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) {
45
+        $this->app->singleton(Contracts\RepositoryInterface::class, function($app) {
46 46
             $path = $app['config']->get('modules.paths.modules');
47 47
 
48 48
             return new Lumen\LumenFileRepository($app, $path);
49 49
         });
50
-        $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) {
50
+        $this->app->singleton(Contracts\ActivatorInterface::class, function($app) {
51 51
             $activator = $app['config']->get('modules.activator');
52 52
             $class = $app['config']->get('modules.activators.'.$activator)['class'];
53 53
 
Please login to merge, or discard this patch.
src/Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             $file = 'module.json';
221 221
         }
222 222
 
223
-        return Arr::get($this->moduleJson, $file, function () use ($file) {
223
+        return Arr::get($this->moduleJson, $file, function() use ($file) {
224 224
             return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->files);
225 225
         });
226 226
     }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     public function isDisabled(): bool
331 331
     {
332
-        return ! $this->isEnabled();
332
+        return !$this->isEnabled();
333 333
     }
334 334
 
335 335
     /**
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
     {
392 392
         return config('modules.register.files', 'register') === 'boot' &&
393 393
             // force register method if option == boot && app is AsgardCms
394
-            ! class_exists('\Modules\Core\Foundation\AsgardCms');
394
+            !class_exists('\Modules\Core\Foundation\AsgardCms');
395 395
     }
396 396
 
397 397
     private function flushCache(): void
Please login to merge, or discard this patch.
src/Commands/Database/MigrateRollbackCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
         $database = $this->option('database');
35 35
 
36
-        if (! empty($database)) {
36
+        if (!empty($database)) {
37 37
             $migrator->setDatabase($database);
38 38
         }
39 39
 
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
         foreach ($this->getFiles() as $stub => $file) {
408 408
             $path = $this->module->getModulePath($this->getName()).$file;
409 409
 
410
-            $this->component->task("Generating file {$path}", function () use ($stub, $path) {
411
-                if (! $this->filesystem->isDirectory($dir = dirname($path))) {
410
+            $this->component->task("Generating file {$path}", function() use ($stub, $path) {
411
+                if (!$this->filesystem->isDirectory($dir = dirname($path))) {
412 412
                     $this->filesystem->makeDirectory($dir, 0775, true);
413 413
                 }
414 414
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
         $eventGeneratorConfig = GenerateConfigReader::read('event-provider');
451 451
         if (
452 452
             (is_null($eventGeneratorConfig->getPath()) && $providerGenerator->generate())
453
-            || (! is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate())
453
+            || (!is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate())
454 454
         ) {
455 455
             $this->console->call('module:make-event-provider', [
456 456
                 'module' => $this->getName(),
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
         $routeGeneratorConfig = GenerateConfigReader::read('route-provider');
470 470
         if (
471 471
             (is_null($routeGeneratorConfig->getPath()) && $providerGenerator->generate())
472
-            || (! is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate())
472
+            || (!is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate())
473 473
         ) {
474 474
             $this->console->call('module:route-provider', [
475 475
                 'module' => $this->getName(),
@@ -524,11 +524,11 @@  discard block
 block discarded – undo
524 524
     {
525 525
         $replacements = $this->module->config('stubs.replacements');
526 526
 
527
-        if (! isset($replacements['composer']['APP_PATH'])) {
527
+        if (!isset($replacements['composer']['APP_PATH'])) {
528 528
             $replacements['composer'][] = 'APP_PATH';
529 529
         }
530 530
 
531
-        if (! isset($replacements[$stub])) {
531
+        if (!isset($replacements[$stub])) {
532 532
             return [];
533 533
         }
534 534
 
@@ -654,8 +654,8 @@  discard block
 block discarded – undo
654 654
     {
655 655
         $path = $this->module->getModulePath($this->getName()).'module.json';
656 656
 
657
-        $this->component->task("Generating file $path", function () use ($path) {
658
-            if (! $this->filesystem->isDirectory($dir = dirname($path))) {
657
+        $this->component->task("Generating file $path", function() use ($path) {
658
+            if (!$this->filesystem->isDirectory($dir = dirname($path))) {
659 659
                 $this->filesystem->makeDirectory($dir, 0775, true);
660 660
             }
661 661
 
Please login to merge, or discard this patch.