@@ -54,12 +54,12 @@ |
||
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 | } |
@@ -33,7 +33,7 @@ |
||
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 |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
@@ -25,7 +25,7 @@ |
||
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'), |
@@ -115,7 +115,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | /** |
@@ -42,12 +42,12 @@ |
||
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 |
@@ -220,7 +220,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -33,7 +33,7 @@ |
||
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 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use PathNamespace; |
10 | 10 | } |
11 | 11 | |
12 | -if (! function_exists('module_path')) { |
|
12 | +if (!function_exists('module_path')) { |
|
13 | 13 | function module_path(string $name, ?string $path = null) |
14 | 14 | { |
15 | 15 | $helper = new Helper(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | } |
21 | 21 | |
22 | -if (! function_exists('module_app_path')) { |
|
22 | +if (!function_exists('module_app_path')) { |
|
23 | 23 | function module_app_path(string $name, ?string $path = null) |
24 | 24 | { |
25 | 25 | $helper = new Helper(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | -if (! function_exists('config_path')) { |
|
32 | +if (!function_exists('config_path')) { |
|
33 | 33 | /** |
34 | 34 | * Get the configuration path. |
35 | 35 | * |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | -if (! function_exists('public_path')) { |
|
45 | +if (!function_exists('public_path')) { |
|
46 | 46 | /** |
47 | 47 | * Get the path to the public folder. |
48 | 48 | * |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | -if (! function_exists('module_vite')) { |
|
58 | +if (!function_exists('module_vite')) { |
|
59 | 59 | /** |
60 | 60 | * support for vite |
61 | 61 | */ |