@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function handle(): int |
| 30 | 30 | { |
| 31 | 31 | $appFolder = config('modules.paths.app_folder', 'app/'); |
| 32 | - $appFolder = rtrim($appFolder, '/') . '/'; |
|
| 32 | + $appFolder = rtrim($appFolder, '/').'/'; |
|
| 33 | 33 | $phpunitXmlPath = base_path('phpunit.xml'); |
| 34 | 34 | $modulesStatusPath = base_path('modules_statuses.json'); |
| 35 | 35 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $enabledModules = json_decode(file_get_contents($modulesStatusPath), true); |
| 47 | 47 | |
| 48 | 48 | if (json_last_error() !== JSON_ERROR_NONE) { |
| 49 | - $this->error("Error decoding JSON from {$modulesStatusPath}: " . json_last_error_msg()); |
|
| 49 | + $this->error("Error decoding JSON from {$modulesStatusPath}: ".json_last_error_msg()); |
|
| 50 | 50 | return 98; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | foreach ($enabledModules as $module => $status) { |
| 57 | 57 | if ($status) { // Only add enabled modules |
| 58 | - $moduleDir = $modulesPath . $module . '/' . $appFolder; |
|
| 58 | + $moduleDir = $modulesPath.$module.'/'.$appFolder; |
|
| 59 | 59 | if (is_dir($moduleDir)) { |
| 60 | 60 | $moduleDirs[] = $moduleDir; |
| 61 | 61 | } |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | /** |
| 265 | 265 | * Set force status. |
| 266 | 266 | */ |
| 267 | - public function setForce(bool|int $force): self |
|
| 267 | + public function setForce(bool | int $force): self |
|
| 268 | 268 | { |
| 269 | 269 | $this->force = $force; |
| 270 | 270 | |
@@ -353,8 +353,8 @@ discard block |
||
| 353 | 353 | foreach ($this->getFiles() as $stub => $file) { |
| 354 | 354 | $path = $this->module->getModulePath($this->getName()).$file; |
| 355 | 355 | |
| 356 | - $this->component->task("Generating file {$path}", function () use ($stub, $path) { |
|
| 357 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 356 | + $this->component->task("Generating file {$path}", function() use ($stub, $path) { |
|
| 357 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 358 | 358 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 359 | 359 | } |
| 360 | 360 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $eventGeneratorConfig = GenerateConfigReader::read('event-provider'); |
| 397 | 397 | if ( |
| 398 | 398 | (is_null($eventGeneratorConfig->getPath()) && $providerGenerator->generate()) |
| 399 | - || (! is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate()) |
|
| 399 | + || (!is_null($eventGeneratorConfig->getPath()) && $eventGeneratorConfig->generate()) |
|
| 400 | 400 | ) { |
| 401 | 401 | $this->console->call('module:make-event-provider', [ |
| 402 | 402 | 'module' => $this->getName(), |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $routeGeneratorConfig = GenerateConfigReader::read('route-provider'); |
| 416 | 416 | if ( |
| 417 | 417 | (is_null($routeGeneratorConfig->getPath()) && $providerGenerator->generate()) |
| 418 | - || (! is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate()) |
|
| 418 | + || (!is_null($routeGeneratorConfig->getPath()) && $routeGeneratorConfig->generate()) |
|
| 419 | 419 | ) { |
| 420 | 420 | $this->console->call('module:route-provider', [ |
| 421 | 421 | 'module' => $this->getName(), |
@@ -467,11 +467,11 @@ discard block |
||
| 467 | 467 | { |
| 468 | 468 | $replacements = $this->module->config('stubs.replacements'); |
| 469 | 469 | |
| 470 | - if (! isset($replacements['composer']['APP_FOLDER_NAME'])) { |
|
| 470 | + if (!isset($replacements['composer']['APP_FOLDER_NAME'])) { |
|
| 471 | 471 | $replacements['composer'][] = 'APP_FOLDER_NAME'; |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - if (! isset($replacements[$stub])) { |
|
| 474 | + if (!isset($replacements[$stub])) { |
|
| 475 | 475 | return []; |
| 476 | 476 | } |
| 477 | 477 | |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
| 489 | 489 | $replace = $this->$method(); |
| 490 | 490 | |
| 491 | - if($stub === 'routes/web' || $stub === 'routes/api' ){ |
|
| 491 | + if ($stub === 'routes/web' || $stub === 'routes/api') { |
|
| 492 | 492 | $replace = str_replace('\\\\', '\\', $replace); |
| 493 | 493 | } |
| 494 | 494 | |
@@ -509,8 +509,8 @@ discard block |
||
| 509 | 509 | { |
| 510 | 510 | $path = $this->module->getModulePath($this->getName()).'module.json'; |
| 511 | 511 | |
| 512 | - $this->component->task("Generating file $path", function () use ($path) { |
|
| 513 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 512 | + $this->component->task("Generating file $path", function() use ($path) { |
|
| 513 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
| 514 | 514 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 515 | 515 | } |
| 516 | 516 | |