@@ -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 | } |
@@ -48,7 +48,6 @@ discard block |
||
| 48 | 48 | /** |
| 49 | 49 | * Set variable style. |
| 50 | 50 | * |
| 51 | - * @param string $style |
|
| 52 | 51 | * @return self |
| 53 | 52 | */ |
| 54 | 53 | public function setStyle($left, $right = null) |
@@ -138,7 +137,7 @@ discard block |
||
| 138 | 137 | /** |
| 139 | 138 | * Get stub contents. |
| 140 | 139 | * |
| 141 | - * @return mixed|string |
|
| 140 | + * @return string |
|
| 142 | 141 | */ |
| 143 | 142 | public function getContents() |
| 144 | 143 | { |
@@ -168,7 +167,7 @@ discard block |
||
| 168 | 167 | * @param string $path |
| 169 | 168 | * @param string $filename |
| 170 | 169 | * |
| 171 | - * @return bool |
|
| 170 | + * @return integer |
|
| 172 | 171 | */ |
| 173 | 172 | public function saveTo($path, $filename) |
| 174 | 173 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $right = $left; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - $this->style = trim($left . 'VARIABLE_NAME' . $right); |
|
| 64 | + $this->style = trim($left.'VARIABLE_NAME'.$right); |
|
| 65 | 65 | |
| 66 | 66 | return $this; |
| 67 | 67 | } |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function getPath() |
| 112 | 112 | { |
| 113 | - $path = static::getBasePath() . $this->path; |
|
| 113 | + $path = static::getBasePath().$this->path; |
|
| 114 | 114 | |
| 115 | - return file_exists($path) ? $path : __DIR__ . '/../Commands/stubs' . $this->path; |
|
| 115 | + return file_exists($path) ? $path : __DIR__.'/../Commands/stubs'.$this->path; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function saveTo($path, $filename) |
| 174 | 174 | { |
| 175 | - return file_put_contents($path . '/' . $filename, $this->getContents()); |
|
| 175 | + return file_put_contents($path.'/'.$filename, $this->getContents()); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'stubs' => [ |
| 29 | 29 | 'enabled' => false, |
| 30 | 30 | 'style' => '$VARIABLE_NAME$', |
| 31 | - 'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs', |
|
| 31 | + 'path' => base_path().'/vendor/nwidart/laravel-modules/src/Commands/stubs', |
|
| 32 | 32 | 'files' => [ |
| 33 | 33 | 'routes/web' => 'Routes/web.php', |
| 34 | 34 | 'routes/api' => 'Routes/api.php', |