@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | continue; |
330 | 330 | } |
331 | 331 | |
332 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
332 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
333 | 333 | |
334 | 334 | $this->filesystem->makeDirectory($path, 0755, true); |
335 | 335 | if (config('modules.stubs.gitkeep')) { |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | */ |
346 | 346 | public function generateGitKeep($path) |
347 | 347 | { |
348 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
348 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | public function generateFiles() |
355 | 355 | { |
356 | 356 | foreach ($this->getFiles() as $stub => $file) { |
357 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
357 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
358 | 358 | |
359 | 359 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
360 | 360 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | |
382 | 382 | if (GenerateConfigReader::read('provider')->generate() === true) { |
383 | 383 | $this->console->call('module:make-provider', [ |
384 | - 'name' => $this->getName() . 'ServiceProvider', |
|
384 | + 'name' => $this->getName().'ServiceProvider', |
|
385 | 385 | 'module' => $this->getName(), |
386 | 386 | '--master' => true, |
387 | 387 | ]); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | |
393 | 393 | if (GenerateConfigReader::read('controller')->generate() === true) { |
394 | 394 | $this->console->call('module:make-controller', [ |
395 | - 'controller' => $this->getName() . 'Controller', |
|
395 | + 'controller' => $this->getName().'Controller', |
|
396 | 396 | 'module' => $this->getName(), |
397 | 397 | ]); |
398 | 398 | } |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | protected function getStubContents($stub) |
409 | 409 | { |
410 | 410 | return (new Stub( |
411 | - '/' . $stub . '.stub', |
|
411 | + '/'.$stub.'.stub', |
|
412 | 412 | $this->getReplacement($stub) |
413 | 413 | ) |
414 | 414 | )->render(); |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | } |
448 | 448 | } |
449 | 449 | foreach ($keys as $key) { |
450 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
450 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
451 | 451 | $replaces[$key] = $this->$method(); |
452 | 452 | } else { |
453 | 453 | $replaces[$key] = null; |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | */ |
463 | 463 | private function generateModuleJsonFile() |
464 | 464 | { |
465 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
465 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
466 | 466 | |
467 | 467 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
468 | 468 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -479,13 +479,13 @@ discard block |
||
479 | 479 | */ |
480 | 480 | private function cleanModuleJsonFile() |
481 | 481 | { |
482 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
482 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
483 | 483 | |
484 | 484 | $content = $this->filesystem->get($path); |
485 | 485 | $namespace = $this->getModuleNamespaceReplacement(); |
486 | 486 | $studlyName = $this->getStudlyNameReplacement(); |
487 | 487 | |
488 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
488 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
489 | 489 | |
490 | 490 | $content = str_replace($provider, '', $content); |
491 | 491 |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function setupStubPath() |
34 | 34 | { |
35 | - $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__ . '/Commands/stubs'; |
|
35 | + $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__.'/Commands/stubs'; |
|
36 | 36 | Stub::setBasePath($path); |
37 | 37 | |
38 | - $this->app->booted(function ($app) { |
|
38 | + $this->app->booted(function($app) { |
|
39 | 39 | /** @var RepositoryInterface $moduleRepository */ |
40 | 40 | $moduleRepository = $app[RepositoryInterface::class]; |
41 | 41 | if ($moduleRepository->config('stubs.enabled') === true) { |
@@ -49,14 +49,14 @@ discard block |
||
49 | 49 | */ |
50 | 50 | protected function registerServices() |
51 | 51 | { |
52 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
52 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
53 | 53 | $path = $app['config']->get('modules.paths.modules'); |
54 | 54 | |
55 | 55 | return new Laravel\LaravelFileRepository($app, $path); |
56 | 56 | }); |
57 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
57 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
58 | 58 | $activator = $app['config']->get('modules.activator'); |
59 | - $class = $app['config']->get('modules.activators.' . $activator)['class']; |
|
59 | + $class = $app['config']->get('modules.activators.'.$activator)['class']; |
|
60 | 60 | |
61 | 61 | if ($class === null) { |
62 | 62 | throw InvalidActivatorClass::missingConfig(); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | foreach ($this->module->getOrdered($this->option('direction')) as $module) { |
52 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
52 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
53 | 53 | $this->migrateStatus($module); |
54 | 54 | } |
55 | 55 |
@@ -77,10 +77,10 @@ discard block |
||
77 | 77 | |
78 | 78 | protected function getEventName(Module $module) |
79 | 79 | { |
80 | - $namespace = $this->laravel['modules']->config('namespace') . "\\" . $module->getStudlyName(); |
|
80 | + $namespace = $this->laravel['modules']->config('namespace')."\\".$module->getStudlyName(); |
|
81 | 81 | $eventPath = GenerateConfigReader::read('event'); |
82 | 82 | |
83 | - $eventName = $namespace . "\\" . $eventPath->getPath() . "\\" . $this->option('event'); |
|
83 | + $eventName = $namespace."\\".$eventPath->getPath()."\\".$this->option('event'); |
|
84 | 84 | |
85 | 85 | return str_replace('/', '\\', $eventName); |
86 | 86 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $listenerPath = GenerateConfigReader::read('listener'); |
93 | 93 | |
94 | - return $path . $listenerPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
94 | + return $path.$listenerPath->getPath().'/'.$this->getFileName().'.php'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -18,10 +18,10 @@ |
||
18 | 18 | // This checks if we are running on a Laravel Vapor managed instance |
19 | 19 | // and sets the path to a writable one (services path is not on a writable storage in Vapor). |
20 | 20 | if (!is_null(env('VAPOR_MAINTENANCE_MODE', null))) { |
21 | - return Str::replaceLast('config.php', $this->getSnakeName() . '_module.php', $this->app->getCachedConfigPath()); |
|
21 | + return Str::replaceLast('config.php', $this->getSnakeName().'_module.php', $this->app->getCachedConfigPath()); |
|
22 | 22 | } |
23 | 23 | |
24 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
24 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -124,8 +124,7 @@ |
||
124 | 124 | |
125 | 125 | foreach (config('modules.commands', $this->commands) as $command) { |
126 | 126 | $commands[] = Str::contains($command, $this->consoleNamespace) ? |
127 | - $command : |
|
128 | - $this->consoleNamespace . "\\"; |
|
127 | + $command : $this->consoleNamespace."\\"; |
|
129 | 128 | } |
130 | 129 | |
131 | 130 | return $commands; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return mixed |
|
62 | + * @return string |
|
63 | 63 | */ |
64 | 64 | protected function getTemplateContents() |
65 | 65 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
81 | - * @return mixed |
|
81 | + * @return string |
|
82 | 82 | */ |
83 | 83 | protected function getDestinationFilePath() |
84 | 84 | { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * @return mixed|string |
|
93 | + * @return string |
|
94 | 94 | */ |
95 | 95 | private function getModelName() |
96 | 96 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $factoryPath = GenerateConfigReader::read('factory'); |
71 | 71 | |
72 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
72 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function getFileName() |
79 | 79 | { |
80 | - return Str::studly($this->argument('name')) . 'Factory.php'; |
|
80 | + return Str::studly($this->argument('name')).'Factory.php'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -107,6 +107,6 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function getModelNamespace(): string |
109 | 109 | { |
110 | - return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $this->laravel['modules']->config('paths.generator.model.path', 'Entities'); |
|
110 | + return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$this->laravel['modules']->config('paths.generator.model.path', 'Entities'); |
|
111 | 111 | } |
112 | 112 | } |