@@ -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; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $paths = array_merge($paths, $this->config('scan.paths')); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - $paths = array_map(function ($path) { |
|
| 119 | + $paths = array_map(function($path) { |
|
| 120 | 120 | return Str::endsWith($path, '/*') ? $path : Str::finish($path, '/*'); |
| 121 | 121 | }, $paths); |
| 122 | 122 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function getCached() |
| 202 | 202 | { |
| 203 | - return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
| 203 | + return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
| 204 | 204 | return $this->toCollection()->toArray(); |
| 205 | 205 | }); |
| 206 | 206 | } |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | { |
| 290 | 290 | $modules = $this->allEnabled(); |
| 291 | 291 | |
| 292 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
| 292 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
| 293 | 293 | if ($a->get('priority') === $b->get('priority')) { |
| 294 | 294 | return 0; |
| 295 | 295 | } |
@@ -418,9 +418,9 @@ discard block |
||
| 418 | 418 | public function getModulePath($module) |
| 419 | 419 | { |
| 420 | 420 | try { |
| 421 | - return $this->findOrFail($module)->getPath() . '/'; |
|
| 421 | + return $this->findOrFail($module)->getPath().'/'; |
|
| 422 | 422 | } catch (ModuleNotFoundException $e) { |
| 423 | - return $this->getPath() . '/' . Str::studly($module) . '/'; |
|
| 423 | + return $this->getPath().'/'.Str::studly($module).'/'; |
|
| 424 | 424 | } |
| 425 | 425 | } |
| 426 | 426 | |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | */ |
| 430 | 430 | public function assetPath(string $module) : string |
| 431 | 431 | { |
| 432 | - return $this->config('paths.assets') . '/' . $module; |
|
| 432 | + return $this->config('paths.assets').'/'.$module; |
|
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | /** |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | */ |
| 438 | 438 | public function config(string $key, $default = null) |
| 439 | 439 | { |
| 440 | - return $this->config->get('modules.' . $key, $default); |
|
| 440 | + return $this->config->get('modules.'.$key, $default); |
|
| 441 | 441 | } |
| 442 | 442 | |
| 443 | 443 | /** |
@@ -527,9 +527,9 @@ discard block |
||
| 527 | 527 | } |
| 528 | 528 | list($name, $url) = explode(':', $asset); |
| 529 | 529 | |
| 530 | - $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
| 530 | + $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
| 531 | 531 | |
| 532 | - $url = $this->url->asset($baseUrl . "/{$name}/" . $url); |
|
| 532 | + $url = $this->url->asset($baseUrl."/{$name}/".$url); |
|
| 533 | 533 | |
| 534 | 534 | return str_replace(['http://', 'https://'], '//', $url); |
| 535 | 535 | } |
@@ -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 | } |
@@ -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', |