@@ -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 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | $file = 'module.json'; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | - return Arr::get($this->moduleJson, $file, function () use ($file) { |
|
| 224 | + return Arr::get($this->moduleJson, $file, function() use ($file) { |
|
| 225 | 225 | return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->files); |
| 226 | 226 | }); |
| 227 | 227 | } |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | */ |
| 329 | 329 | public function isDisabled(): bool |
| 330 | 330 | { |
| 331 | - return ! $this->isEnabled(); |
|
| 331 | + return !$this->isEnabled(); |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | /** |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | */ |
| 385 | 385 | public function getExtraPath(?string $path): string |
| 386 | 386 | { |
| 387 | - return $this->getPath() . ($path ? '/' . $path : ''); |
|
| 387 | + return $this->getPath().($path ? '/'.$path : ''); |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | /** |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | { |
| 395 | 395 | return config('modules.register.files', 'register') === 'boot' && |
| 396 | 396 | // force register method if option == boot && app is AsgardCms |
| 397 | - ! class_exists('\Modules\Core\Foundation\AsgardCms'); |
|
| 397 | + !class_exists('\Modules\Core\Foundation\AsgardCms'); |
|
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | /** |