@@ -10,12 +10,12 @@ |
||
10 | 10 | public function executeAction($name): void |
11 | 11 | { |
12 | 12 | $module = $this->getModuleModel($name); |
13 | - $this->components->task("Deleting <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
13 | + $this->components->task("Deleting <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
14 | 14 | $module->delete(); |
15 | 15 | }); |
16 | 16 | } |
17 | 17 | |
18 | - public function getInfo(): string|null |
|
18 | + public function getInfo(): string | null |
|
19 | 19 | { |
20 | 20 | return 'deleting module ...'; |
21 | 21 | } |
@@ -26,11 +26,11 @@ |
||
26 | 26 | { |
27 | 27 | $module = $this->getModuleModel($name); |
28 | 28 | |
29 | - $this->components->task("Running Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
29 | + $this->components->task("Running Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
30 | 30 | $path = str_replace(base_path(), '', (new Migrator($module, $this->getLaravel()))->getPath()); |
31 | 31 | |
32 | 32 | if ($this->option('subpath')) { |
33 | - $path = $path . "/" . $this->option("subpath"); |
|
33 | + $path = $path."/".$this->option("subpath"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $this->call('migrate', [ |
@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | $module = $this->getModuleModel($name); |
27 | 27 | |
28 | - $this->components->task("Refreshing Migration {$module->getName()} module", function () use ($module) { |
|
28 | + $this->components->task("Refreshing Migration {$module->getName()} module", function() use ($module) { |
|
29 | 29 | $this->call('module:migrate-reset', [ |
30 | 30 | 'module' => $module->getStudlyName(), |
31 | 31 | '--database' => $this->option('database'), |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function registerNamespaces() |
38 | 38 | { |
39 | - $configPath = __DIR__ . '/../config/config.php'; |
|
40 | - $stubsPath = dirname(__DIR__) . '/src/Commands/stubs'; |
|
39 | + $configPath = __DIR__.'/../config/config.php'; |
|
40 | + $stubsPath = dirname(__DIR__).'/src/Commands/stubs'; |
|
41 | 41 | |
42 | 42 | $this->publishes([ |
43 | 43 | $configPath => config_path('modules.php'), |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ], 'stubs'); |
49 | 49 | |
50 | 50 | $this->publishes([ |
51 | - __DIR__ . '/../scripts/vite-module-loader.js' => base_path('vite-module-loader.js'), |
|
51 | + __DIR__.'/../scripts/vite-module-loader.js' => base_path('vite-module-loader.js'), |
|
52 | 52 | ], 'vite'); |
53 | 53 | } |
54 | 54 |
@@ -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->makeDirectory($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 | } |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | |
412 | 412 | if (GenerateConfigReader::read('provider')->generate() === true) { |
413 | 413 | $this->console->call('module:make-provider', [ |
414 | - 'name' => $this->getName() . 'ServiceProvider', |
|
414 | + 'name' => $this->getName().'ServiceProvider', |
|
415 | 415 | 'module' => $this->getName(), |
416 | 416 | '--master' => true, |
417 | 417 | ]); |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | if (GenerateConfigReader::read('controller')->generate() === true) { |
424 | 424 | $options = $this->type == 'api' ? ['--api' => true] : []; |
425 | 425 | $this->console->call('module:make-controller', [ |
426 | - 'controller' => $this->getName() . 'Controller', |
|
426 | + 'controller' => $this->getName().'Controller', |
|
427 | 427 | 'module' => $this->getName(), |
428 | 428 | ] + $options); |
429 | 429 | } |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | protected function getStubContents($stub) |
440 | 440 | { |
441 | 441 | return (new Stub( |
442 | - '/' . $stub . '.stub', |
|
442 | + '/'.$stub.'.stub', |
|
443 | 443 | $this->getReplacement($stub) |
444 | 444 | ) |
445 | 445 | )->render(); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | } |
479 | 479 | } |
480 | 480 | foreach ($keys as $key) { |
481 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
481 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
482 | 482 | $replaces[$key] = $this->$method(); |
483 | 483 | } else { |
484 | 484 | $replaces[$key] = null; |
@@ -493,9 +493,9 @@ discard block |
||
493 | 493 | */ |
494 | 494 | private function generateModuleJsonFile() |
495 | 495 | { |
496 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
496 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
497 | 497 | |
498 | - $this->component->task("Generating file $path", function () use ($path) { |
|
498 | + $this->component->task("Generating file $path", function() use ($path) { |
|
499 | 499 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
500 | 500 | $this->filesystem->makeDirectory($dir, 0775, true); |
501 | 501 | } |
@@ -510,13 +510,13 @@ discard block |
||
510 | 510 | */ |
511 | 511 | private function cleanModuleJsonFile() |
512 | 512 | { |
513 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
513 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
514 | 514 | |
515 | 515 | $content = $this->filesystem->get($path); |
516 | 516 | $namespace = $this->getModuleNamespaceReplacement(); |
517 | 517 | $studlyName = $this->getStudlyNameReplacement(); |
518 | 518 | |
519 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
519 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
520 | 520 | |
521 | 521 | $content = str_replace($provider, '', $content); |
522 | 522 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | abstract public function executeAction($name); |
42 | 42 | |
43 | - public function getInfo(): string|null |
|
43 | + public function getInfo(): string | null |
|
44 | 44 | { |
45 | 45 | return null; |
46 | 46 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function handle() |
52 | 52 | { |
53 | - if (! is_null($info = $this->getInfo())) { |
|
53 | + if (!is_null($info = $this->getInfo())) { |
|
54 | 54 | $this->components->info($info); |
55 | 55 | } |
56 | 56 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return; |
72 | 72 | } |
73 | 73 | |
74 | - if (! empty($input->getArgument('module'))) { |
|
74 | + if (!empty($input->getArgument('module'))) { |
|
75 | 75 | return; |
76 | 76 | } |
77 | 77 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $database = $this->option('database'); |
34 | 34 | |
35 | - if (! empty($database)) { |
|
35 | + if (!empty($database)) { |
|
36 | 36 | $migrator->setDatabase($database); |
37 | 37 | } |
38 | 38 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->components->warn("Nothing to rollback on module <fg=cyan;options=bold>{$module->getName()}</>"); |
50 | 50 | } |
51 | 51 | |
52 | - public function getInfo(): string|null |
|
52 | + public function getInfo(): string | null |
|
53 | 53 | { |
54 | 54 | return null; |
55 | 55 | } |
@@ -22,12 +22,12 @@ |
||
22 | 22 | { |
23 | 23 | $module = $this->getModuleModel($name); |
24 | 24 | |
25 | - $this->components->task("Updating <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
25 | + $this->components->task("Updating <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
26 | 26 | $this->laravel['modules']->update($module); |
27 | 27 | }); |
28 | 28 | } |
29 | 29 | |
30 | - public function getInfo(): string|null |
|
30 | + public function getInfo(): string | null |
|
31 | 31 | { |
32 | 32 | return 'Updating Module ...'; |
33 | 33 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $path = str_replace('/', '\\', $path); |
74 | 74 | |
75 | - return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $path; |
|
75 | + return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$path; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function getModelVariable(): string |
90 | 90 | { |
91 | - return '$' . Str::lower($this->argument('name')); |
|
91 | + return '$'.Str::lower($this->argument('name')); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $observerPath = GenerateConfigReader::read('observer'); |
102 | 102 | |
103 | - return $path . $observerPath->getPath() . '/' . $this->getFileName(); |
|
103 | + return $path.$observerPath->getPath().'/'.$this->getFileName(); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | private function getFileName() |
110 | 110 | { |
111 | - return Str::studly($this->argument('name')) . 'Observer.php'; |
|
111 | + return Str::studly($this->argument('name')).'Observer.php'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | public function handle(): int |