Completed
Push — master ( ef3e6b...7653cc )
by
unknown
09:36 queued 15s
created
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/helpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Illuminate\Foundation\Vite;
4 4
 use Illuminate\Support\Facades\Vite as ViteFacade;
5 5
 
6
-if (! function_exists('module_path')) {
6
+if (!function_exists('module_path')) {
7 7
     function module_path($name, $path = '')
8 8
     {
9 9
         $module = app('modules')->find($name);
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     }
13 13
 }
14 14
 
15
-if (! function_exists('config_path')) {
15
+if (!function_exists('config_path')) {
16 16
     /**
17 17
      * Get the configuration path.
18 18
      *
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 }
27 27
 
28
-if (! function_exists('public_path')) {
28
+if (!function_exists('public_path')) {
29 29
     /**
30 30
      * Get the path to the public folder.
31 31
      *
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     }
39 39
 }
40 40
 
41
-if (! function_exists('module_vite')) {
41
+if (!function_exists('module_vite')) {
42 42
     /**
43 43
      * support for vite
44 44
      */
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/ModuleManifest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function config($key)
89 89
     {
90
-        return collect($this->getManifest())->flatMap(function ($configuration) use ($key) {
90
+        return collect($this->getManifest())->flatMap(function($configuration) use ($key) {
91 91
             return (array) ($configuration[$key] ?? []);
92 92
         })->filter()->all();
93 93
     }
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
      */
100 100
     protected function getManifest()
101 101
     {
102
-        if (! is_null($this->manifest)) {
102
+        if (!is_null($this->manifest)) {
103 103
             return $this->manifest;
104 104
         }
105 105
 
106
-        if (! is_file($this->manifestPath)) {
106
+        if (!is_file($this->manifestPath)) {
107 107
             $this->build();
108 108
         }
109 109
 
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
     public function build()
120 120
     {
121 121
         $providers = $this->paths
122
-            ->flatMap(function ($path) {
122
+            ->flatMap(function($path) {
123 123
                 $manifests = $this->files->glob("{$path}/module.json");
124 124
                 is_array($manifests) || $manifests = [];
125 125
 
126 126
                 return collect($manifests)
127
-                    ->map(function ($manifest) {
127
+                    ->map(function($manifest) {
128 128
                         return $this->files->json($manifest);
129 129
                     });
130 130
             })
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     protected function write(array $manifest)
154 154
     {
155
-        if (! is_writable($dirname = dirname($this->manifestPath))) {
155
+        if (!is_writable($dirname = dirname($this->manifestPath))) {
156 156
             throw new Exception("The {$dirname} directory must be present and writable.");
157 157
         }
158 158
         $this->files->replace(
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
     /**
281 281
      * Set force status.
282 282
      */
283
-    public function setForce(bool|int $force): self
283
+    public function setForce(bool | int $force): self
284 284
     {
285 285
         $this->force = $force;
286 286
 
@@ -364,8 +364,8 @@  discard block
 block discarded – undo
364 364
         foreach ($this->getFiles() as $stub => $file) {
365 365
             $path = $this->module->getModulePath($this->getName()).$file;
366 366
 
367
-            $this->component->task("Generating file {$path}", function () use ($stub, $path) {
368
-                if (! $this->filesystem->isDirectory($dir = dirname($path))) {
367
+            $this->component->task("Generating file {$path}", function() use ($stub, $path) {
368
+                if (!$this->filesystem->isDirectory($dir = dirname($path))) {
369 369
                     $this->filesystem->makeDirectory($dir, 0775, true);
370 370
                 }
371 371
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         $eventGeneratorConfig = GenerateConfigReader::read('event-provider');
408 408
         if (
409 409
             (is_null($eventGeneratorConfig->getPath()) && $providerGenerator->generate())
410
-            || (! is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate())
410
+            || (!is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate())
411 411
         ) {
412 412
             $this->console->call('module:make-event-provider', [
413 413
                 'module' => $this->getName(),
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
         $routeGeneratorConfig = GenerateConfigReader::read('route-provider');
427 427
         if (
428 428
             (is_null($routeGeneratorConfig->getPath()) && $providerGenerator->generate())
429
-            || (! is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate())
429
+            || (!is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate())
430 430
         ) {
431 431
             $this->console->call('module:route-provider', [
432 432
                 'module' => $this->getName(),
@@ -478,11 +478,11 @@  discard block
 block discarded – undo
478 478
     {
479 479
         $replacements = $this->module->config('stubs.replacements');
480 480
 
481
-        if (! isset($replacements['composer']['APP_FOLDER_NAME'])) {
481
+        if (!isset($replacements['composer']['APP_FOLDER_NAME'])) {
482 482
             $replacements['composer'][] = 'APP_FOLDER_NAME';
483 483
         }
484 484
 
485
-        if (! isset($replacements[$stub])) {
485
+        if (!isset($replacements[$stub])) {
486 486
             return [];
487 487
         }
488 488
 
@@ -513,8 +513,8 @@  discard block
 block discarded – undo
513 513
     {
514 514
         $path = $this->module->getModulePath($this->getName()).'module.json';
515 515
 
516
-        $this->component->task("Generating file $path", function () use ($path) {
517
-            if (! $this->filesystem->isDirectory($dir = dirname($path))) {
516
+        $this->component->task("Generating file $path", function() use ($path) {
517
+            if (!$this->filesystem->isDirectory($dir = dirname($path))) {
518 518
                 $this->filesystem->makeDirectory($dir, 0775, true);
519 519
             }
520 520
 
Please login to merge, or discard this patch.