@@ -30,7 +30,7 @@ |
||
| 30 | 30 | ]); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - public function getInfo(): string|null |
|
| 33 | + public function getInfo(): string | null |
|
| 34 | 34 | { |
| 35 | 35 | return 'Publishing module config files ...'; |
| 36 | 36 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $module = $this->getModuleModel($name); |
| 28 | 28 | |
| 29 | - $this->components->task("Publishing Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
| 29 | + $this->components->task("Publishing Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
| 30 | 30 | with(new MigrationPublisher(new Migrator($module, $this->getLaravel()))) |
| 31 | 31 | ->setRepository($this->laravel['modules']) |
| 32 | 32 | ->setConsole($this) |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | }); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - public function getInfo(): string|null |
|
| 37 | + public function getInfo(): string | null |
|
| 38 | 38 | { |
| 39 | 39 | return 'Publishing module migrations ...'; |
| 40 | 40 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $module = $this->getModuleModel($name); |
| 26 | 26 | |
| 27 | - $this->components->task("Publishing Translations <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
| 27 | + $this->components->task("Publishing Translations <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
| 28 | 28 | with(new LangPublisher($module)) |
| 29 | 29 | ->setRepository($this->laravel['modules']) |
| 30 | 30 | ->setConsole($this) |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | }); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - public function getInfo(): string|null |
|
| 35 | + public function getInfo(): string | null |
|
| 36 | 36 | { |
| 37 | 37 | return 'Publishing module translations ...'; |
| 38 | 38 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $module = $this->getModuleModel($name); |
| 26 | 26 | |
| 27 | - $this->components->task("Publishing Assets <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
| 27 | + $this->components->task("Publishing Assets <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
| 28 | 28 | with(new AssetPublisher($module)) |
| 29 | 29 | ->setRepository($this->laravel['modules']) |
| 30 | 30 | ->setConsole($this) |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - public function getInfo(): string|null |
|
| 36 | + public function getInfo(): string | null |
|
| 37 | 37 | { |
| 38 | 38 | return 'Publishing module asset files ...'; |
| 39 | 39 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
| 36 | 36 | $factoryPath = GenerateConfigReader::read('views'); |
| 37 | 37 | |
| 38 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
| 38 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -43,6 +43,6 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | private function getFileName(): string |
| 45 | 45 | { |
| 46 | - return Str::lower($this->argument('name')) . '.blade.php'; |
|
| 46 | + return Str::lower($this->argument('name')).'.blade.php'; |
|
| 47 | 47 | } |
| 48 | 48 | } |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | continue; |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
| 362 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
| 363 | 363 | |
| 364 | 364 | $this->filesystem->ensureDirectoryExists($path, 0755, true); |
| 365 | 365 | if (config('modules.stubs.gitkeep')) { |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | */ |
| 376 | 376 | public function generateGitKeep($path) |
| 377 | 377 | { |
| 378 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
| 378 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | /** |
@@ -384,9 +384,9 @@ discard block |
||
| 384 | 384 | public function generateFiles() |
| 385 | 385 | { |
| 386 | 386 | foreach ($this->getFiles() as $stub => $file) { |
| 387 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
| 387 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
| 388 | 388 | |
| 389 | - $this->component->task("Generating file {$path}", function () use ($stub, $path) { |
|
| 389 | + $this->component->task("Generating file {$path}", function() use ($stub, $path) { |
|
| 390 | 390 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 391 | 391 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 392 | 392 | } |
@@ -412,14 +412,14 @@ discard block |
||
| 412 | 412 | $providerGenerator = GenerateConfigReader::read('provider'); |
| 413 | 413 | if ($providerGenerator->generate() === true) { |
| 414 | 414 | $this->console->call('module:make-provider', [ |
| 415 | - 'name' => $this->getName() . 'ServiceProvider', |
|
| 415 | + 'name' => $this->getName().'ServiceProvider', |
|
| 416 | 416 | 'module' => $this->getName(), |
| 417 | 417 | '--master' => true, |
| 418 | 418 | ]); |
| 419 | 419 | } else { |
| 420 | 420 | // delete register ServiceProvider on module.json |
| 421 | - $path = $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . 'module.json'; |
|
| 422 | - $module_file = $this->filesystem->get($path); |
|
| 421 | + $path = $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.'module.json'; |
|
| 422 | + $module_file = $this->filesystem->get($path); |
|
| 423 | 423 | $this->filesystem->put( |
| 424 | 424 | $path, |
| 425 | 425 | preg_replace('/"providers": \[.*?\],/s', '"providers": [ ],', $module_file) |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | $this->filesystem->replaceInFile( |
| 441 | 441 | '$this->app->register(Route', |
| 442 | 442 | '// $this->app->register(Route', |
| 443 | - $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . $providerGenerator->getPath() . DIRECTORY_SEPARATOR . sprintf('%sServiceProvider.php', $this->getName()) |
|
| 443 | + $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.$providerGenerator->getPath().DIRECTORY_SEPARATOR.sprintf('%sServiceProvider.php', $this->getName()) |
|
| 444 | 444 | ); |
| 445 | 445 | } |
| 446 | 446 | } |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | if (GenerateConfigReader::read('controller')->generate() === true) { |
| 449 | 449 | $options = $this->type == 'api' ? ['--api' => true] : []; |
| 450 | 450 | $this->console->call('module:make-controller', [ |
| 451 | - 'controller' => $this->getName() . 'Controller', |
|
| 451 | + 'controller' => $this->getName().'Controller', |
|
| 452 | 452 | 'module' => $this->getName(), |
| 453 | 453 | ] + $options); |
| 454 | 454 | } |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | protected function getStubContents($stub) |
| 465 | 465 | { |
| 466 | 466 | return (new Stub( |
| 467 | - '/' . $stub . '.stub', |
|
| 467 | + '/'.$stub.'.stub', |
|
| 468 | 468 | $this->getReplacement($stub) |
| 469 | 469 | ) |
| 470 | 470 | )->render(); |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | } |
| 504 | 504 | } |
| 505 | 505 | foreach ($keys as $key) { |
| 506 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
| 506 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
| 507 | 507 | $replaces[$key] = $this->$method(); |
| 508 | 508 | } else { |
| 509 | 509 | $replaces[$key] = null; |
@@ -518,9 +518,9 @@ discard block |
||
| 518 | 518 | */ |
| 519 | 519 | private function generateModuleJsonFile() |
| 520 | 520 | { |
| 521 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 521 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 522 | 522 | |
| 523 | - $this->component->task("Generating file $path", function () use ($path) { |
|
| 523 | + $this->component->task("Generating file $path", function() use ($path) { |
|
| 524 | 524 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 525 | 525 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 526 | 526 | } |
@@ -535,13 +535,13 @@ discard block |
||
| 535 | 535 | */ |
| 536 | 536 | private function cleanModuleJsonFile() |
| 537 | 537 | { |
| 538 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 538 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 539 | 539 | |
| 540 | 540 | $content = $this->filesystem->get($path); |
| 541 | 541 | $namespace = $this->getModuleNamespaceReplacement(); |
| 542 | 542 | $studlyName = $this->getStudlyNameReplacement(); |
| 543 | 543 | |
| 544 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
| 544 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
| 545 | 545 | |
| 546 | 546 | $content = str_replace($provider, '', $content); |
| 547 | 547 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | $servicePath = GenerateConfigReader::read('service'); |
| 24 | 24 | |
| 25 | - return $path . $servicePath->getPath() . '/' . $this->getServiceName() . '.php'; |
|
| 25 | + return $path.$servicePath->getPath().'/'.$this->getServiceName().'.php'; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | protected function getTemplateContents(): string |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | ]; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - protected function getServiceName(): array|string |
|
| 46 | + protected function getServiceName(): array | string |
|
| 47 | 47 | { |
| 48 | 48 | return Str::studly($this->argument('name')); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - private function getClassNameWithoutNamespace(): array|string |
|
| 51 | + private function getClassNameWithoutNamespace(): array | string |
|
| 52 | 52 | { |
| 53 | 53 | return class_basename($this->getServiceName()); |
| 54 | 54 | } |