@@ -407,8 +407,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function clean_path(string $path, $ds = '/'): string |
| 33 | 33 | { |
| 34 | - return $this->clean($path, $ds) . $ds; |
|
| 34 | + return $this->clean($path, $ds).$ds; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function module_namespace(string $module, ?string $path = null): string |
| 65 | 65 | { |
| 66 | - $module_namespace = config('modules.namespace', $this->path_namespace(config('modules.paths.modules'))) . '\\' . ($module); |
|
| 67 | - $module_namespace .= strlen($path) ? '\\' . $this->path_namespace($path) : ''; |
|
| 66 | + $module_namespace = config('modules.namespace', $this->path_namespace(config('modules.paths.modules'))).'\\'.($module); |
|
| 67 | + $module_namespace .= strlen($path) ? '\\'.$this->path_namespace($path) : ''; |
|
| 68 | 68 | |
| 69 | 69 | return $this->studly_namespace($module_namespace); |
| 70 | 70 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function module_path(string $module, ?string $path = null): string |
| 76 | 76 | { |
| 77 | - $module_path = $this->clean_path(config('modules.paths.modules', base_path('modules/'))) . ($module); |
|
| 77 | + $module_path = $this->clean_path(config('modules.paths.modules', base_path('modules/'))).($module); |
|
| 78 | 78 | $module_path .= strlen($path) ? $this->clean_path($path) : ''; |
| 79 | 79 | |
| 80 | 80 | return $this->clean_path($module_path); |
@@ -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 | */ |