@@ -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 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $contents = $this->getTemplateContents(); |
47 | 47 | |
48 | 48 | try { |
49 | - $this->components->task("Generating file {$path}", function () use ($path, $contents) { |
|
49 | + $this->components->task("Generating file {$path}", function() use ($path, $contents) { |
|
50 | 50 | $overwriteFile = $this->hasOption('force') ? $this->option('force') : false; |
51 | 51 | (new FileGenerator($path, $contents))->withFileOverwrite($overwriteFile)->generate(); |
52 | 52 | }); |
@@ -91,6 +91,6 @@ discard block |
||
91 | 91 | { |
92 | 92 | $path_namespace = $this->path_namespace(str_replace($this->getClass(), '', $this->argument($this->argumentName))); |
93 | 93 | |
94 | - return $this->module_namespace($module->getStudlyName(), $this->getDefaultNamespace() . ($path_namespace ? '\\' . $path_namespace : '')); |
|
94 | + return $this->module_namespace($module->getStudlyName(), $this->getDefaultNamespace().($path_namespace ? '\\'.$path_namespace : '')); |
|
95 | 95 | } |
96 | 96 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | */ |
39 | 39 | public function module_namespace(string $module, string $path = null): string |
40 | 40 | { |
41 | - $module_namespace = config('modules.namespace', $this->path_namespace(config('modules.paths.modules'))) . '\\' . ($module); |
|
42 | - $module_namespace .= strlen($path) ? '\\' . $this->path_namespace($path) : ''; |
|
41 | + $module_namespace = config('modules.namespace', $this->path_namespace(config('modules.paths.modules'))).'\\'.($module); |
|
42 | + $module_namespace .= strlen($path) ? '\\'.$this->path_namespace($path) : ''; |
|
43 | 43 | |
44 | 44 | return $this->studly_namespace($module_namespace); |
45 | 45 | } |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | { |
22 | 22 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
23 | 23 | |
24 | - $filePath = GenerateConfigReader::read('enums')->getPath() ?? config('modules.paths.app_folder') . 'Enums'; |
|
24 | + $filePath = GenerateConfigReader::read('enums')->getPath() ?? config('modules.paths.app_folder').'Enums'; |
|
25 | 25 | |
26 | - return $path . $filePath . '/' . $this->getEnumName() . '.php'; |
|
26 | + return $path.$filePath.'/'.$this->getEnumName().'.php'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | protected function getTemplateContents(): string |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | |
57 | - protected function getEnumName(): array|string |
|
57 | + protected function getEnumName(): array | string |
|
58 | 58 | { |
59 | 59 | return Str::studly($this->argument('name')); |
60 | 60 | } |
61 | 61 | |
62 | - private function getClassNameWithoutNamespace(): array|string |
|
62 | + private function getClassNameWithoutNamespace(): array | string |
|
63 | 63 | { |
64 | 64 | return class_basename($this->getEnumName()); |
65 | 65 | } |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | { |
22 | 22 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
23 | 23 | |
24 | - $filePath = GenerateConfigReader::read('services')->getPath() ?? config('modules.paths.app_folder') . 'Services'; |
|
24 | + $filePath = GenerateConfigReader::read('services')->getPath() ?? config('modules.paths.app_folder').'Services'; |
|
25 | 25 | |
26 | - return $path . $filePath . '/' . $this->getServiceName() . '.php'; |
|
26 | + return $path.$filePath.'/'.$this->getServiceName().'.php'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | protected function getTemplateContents(): string |
@@ -55,12 +55,12 @@ discard block |
||
55 | 55 | ]; |
56 | 56 | } |
57 | 57 | |
58 | - protected function getServiceName(): array|string |
|
58 | + protected function getServiceName(): array | string |
|
59 | 59 | { |
60 | 60 | return Str::studly($this->argument('name')); |
61 | 61 | } |
62 | 62 | |
63 | - private function getClassNameWithoutNamespace(): array|string |
|
63 | + private function getClassNameWithoutNamespace(): array | string |
|
64 | 64 | { |
65 | 65 | return class_basename($this->getServiceName()); |
66 | 66 | } |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | { |
22 | 22 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
23 | 23 | |
24 | - $filePath = GenerateConfigReader::read('actions')->getPath() ?? config('modules.paths.app_folder') . 'Actions'; |
|
24 | + $filePath = GenerateConfigReader::read('actions')->getPath() ?? config('modules.paths.app_folder').'Actions'; |
|
25 | 25 | |
26 | - return $path . $filePath . '/' . $this->getActionName() . '.php'; |
|
26 | + return $path.$filePath.'/'.$this->getActionName().'.php'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | protected function getTemplateContents(): string |
@@ -55,12 +55,12 @@ discard block |
||
55 | 55 | ]; |
56 | 56 | } |
57 | 57 | |
58 | - protected function getActionName(): array|string |
|
58 | + protected function getActionName(): array | string |
|
59 | 59 | { |
60 | 60 | return Str::studly($this->argument('name')); |
61 | 61 | } |
62 | 62 | |
63 | - private function getClassNameWithoutNamespace(): array|string |
|
63 | + private function getClassNameWithoutNamespace(): array | string |
|
64 | 64 | { |
65 | 65 | return class_basename($this->getActionName()); |
66 | 66 | } |