@@ -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'), |
@@ -3,7 +3,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | */ |
@@ -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 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__.'/Commands/stubs'; |
47 | 47 | Stub::setBasePath($path); |
48 | 48 | |
49 | - $this->app->booted(function ($app) { |
|
49 | + $this->app->booted(function($app) { |
|
50 | 50 | /** @var RepositoryInterface $moduleRepository */ |
51 | 51 | $moduleRepository = $app[RepositoryInterface::class]; |
52 | 52 | if ($moduleRepository->config('stubs.enabled') === true) { |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | */ |
61 | 61 | protected function registerServices() |
62 | 62 | { |
63 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
63 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
64 | 64 | $path = $app['config']->get('modules.paths.modules'); |
65 | 65 | |
66 | 66 | return new Laravel\LaravelFileRepository($app, $path); |
67 | 67 | }); |
68 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
68 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
69 | 69 | $activator = $app['config']->get('modules.activator'); |
70 | 70 | $class = $app['config']->get('modules.activators.'.$activator)['class']; |
71 | 71 | |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | |
81 | 81 | protected function registerMigrations(): void |
82 | 82 | { |
83 | - if (! $this->app['config']->get('modules.auto-discover.migrations', true)) { |
|
83 | + if (!$this->app['config']->get('modules.auto-discover.migrations', true)) { |
|
84 | 84 | return; |
85 | 85 | } |
86 | 86 | |
87 | - $this->app->resolving(Migrator::class, function (Migrator $migrator) { |
|
87 | + $this->app->resolving(Migrator::class, function(Migrator $migrator) { |
|
88 | 88 | |
89 | 89 | $path = implode(DIRECTORY_SEPARATOR, [ |
90 | 90 | $this->app['config']->get('modules.paths.modules'), |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | ]); |
95 | 95 | |
96 | 96 | collect(glob($path, GLOB_ONLYDIR)) |
97 | - ->each(function (string $path) use ($migrator) { |
|
97 | + ->each(function(string $path) use ($migrator) { |
|
98 | 98 | $migrator->path($path); |
99 | 99 | }); |
100 | 100 | }); |