@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | - * @return mixed |
|
| 60 | + * @return string |
|
| 61 | 61 | */ |
| 62 | 62 | protected function getTemplateContents() |
| 63 | 63 | { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * @return mixed |
|
| 73 | + * @return string |
|
| 74 | 74 | */ |
| 75 | 75 | protected function getDestinationFilePath() |
| 76 | 76 | { |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $seederPath = $this->laravel['modules']->config('paths.generator.filter'); |
| 74 | 74 | |
| 75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; |
|
| 75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | /** |
| 90 | 90 | * Get scanned modules paths. |
| 91 | 91 | * |
| 92 | - * @return array |
|
| 92 | + * @return string[] |
|
| 93 | 93 | */ |
| 94 | 94 | public function getScanPaths() |
| 95 | 95 | { |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | /** |
| 368 | 368 | * Get module path for a specific module. |
| 369 | 369 | * |
| 370 | - * @param $module |
|
| 370 | + * @param string $module |
|
| 371 | 371 | * |
| 372 | 372 | * @return string |
| 373 | 373 | */ |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | /** |
| 396 | 396 | * Get a specific config data from a configuration file. |
| 397 | 397 | * |
| 398 | - * @param $key |
|
| 398 | + * @param string $key |
|
| 399 | 399 | * |
| 400 | 400 | * @return mixed |
| 401 | 401 | */ |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | /** |
| 436 | 436 | * Get module used for cli session. |
| 437 | 437 | * |
| 438 | - * @return string |
|
| 438 | + * @return Module |
|
| 439 | 439 | */ |
| 440 | 440 | public function getUsedNow() |
| 441 | 441 | { |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | /** |
| 446 | 446 | * Get used now. |
| 447 | 447 | * |
| 448 | - * @return string |
|
| 448 | + * @return Module |
|
| 449 | 449 | */ |
| 450 | 450 | public function getUsed() |
| 451 | 451 | { |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | * |
| 520 | 520 | * @param string $name |
| 521 | 521 | * |
| 522 | - * @return bool |
|
| 522 | + * @return boolean|null |
|
| 523 | 523 | */ |
| 524 | 524 | public function enable($name) |
| 525 | 525 | { |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | * |
| 532 | 532 | * @param string $name |
| 533 | 533 | * |
| 534 | - * @return bool |
|
| 534 | + * @return boolean|null |
|
| 535 | 535 | */ |
| 536 | 536 | public function disable($name) |
| 537 | 537 | { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $paths = $this->paths; |
| 97 | 97 | |
| 98 | - $paths[] = $this->getPath() . '/*'; |
|
| 98 | + $paths[] = $this->getPath().'/*'; |
|
| 99 | 99 | |
| 100 | 100 | if ($this->config('scan.enabled')) { |
| 101 | 101 | $paths = array_merge($paths, $this->config('scan.paths')); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $modules = []; |
| 159 | 159 | |
| 160 | 160 | foreach ($cached as $name => $module) { |
| 161 | - $path = $this->config('paths.modules') . '/' . $name; |
|
| 161 | + $path = $this->config('paths.modules').'/'.$name; |
|
| 162 | 162 | |
| 163 | 163 | $lowerName = strtolower($name); |
| 164 | 164 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function getCached() |
| 177 | 177 | { |
| 178 | - return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
| 178 | + return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
| 179 | 179 | return $this->toCollection()->toArray(); |
| 180 | 180 | }); |
| 181 | 181 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | { |
| 264 | 264 | $modules = $this->enabled(); |
| 265 | 265 | |
| 266 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
| 266 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
| 267 | 267 | if ($a->order == $b->order) { |
| 268 | 268 | return 0; |
| 269 | 269 | } |
@@ -374,9 +374,9 @@ discard block |
||
| 374 | 374 | public function getModulePath($module) |
| 375 | 375 | { |
| 376 | 376 | try { |
| 377 | - return $this->findOrFail($module)->getPath() . '/'; |
|
| 377 | + return $this->findOrFail($module)->getPath().'/'; |
|
| 378 | 378 | } catch (ModuleNotFoundException $e) { |
| 379 | - return $this->getPath() . '/' . Str::studly($module) . '/'; |
|
| 379 | + return $this->getPath().'/'.Str::studly($module).'/'; |
|
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | 382 | |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | */ |
| 390 | 390 | public function assetPath($module) |
| 391 | 391 | { |
| 392 | - return $this->config('paths.assets') . '/' . $module; |
|
| 392 | + return $this->config('paths.assets').'/'.$module; |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | /** |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | */ |
| 402 | 402 | public function config($key) |
| 403 | 403 | { |
| 404 | - return $this->app['config']->get('modules.' . $key); |
|
| 404 | + return $this->app['config']->get('modules.'.$key); |
|
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | /** |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $this->app['files']->makeDirectory($path, 0777, true); |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | - return $path . '/modules.used'; |
|
| 418 | + return $path.'/modules.used'; |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | /** |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | |
| 486 | 486 | $baseUrl = str_replace(public_path(), '', $this->getAssetsPath()); |
| 487 | 487 | |
| 488 | - $url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url); |
|
| 488 | + $url = $this->app['url']->asset($baseUrl."/{$name}/".$url); |
|
| 489 | 489 | |
| 490 | 490 | return str_replace(['http://', 'https://'], '//', $url); |
| 491 | 491 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | "EVENTNAME" => $this->getEventName($module), |
| 63 | 63 | "EVENTSHORTENEDNAME" => $this->option('event'), |
| 64 | 64 | "CLASS" => $this->getClass(), |
| 65 | - 'DUMMYNAMESPACE' => $this->laravel->getNamespace() . "Events", |
|
| 65 | + 'DUMMYNAMESPACE' => $this->laravel->getNamespace()."Events", |
|
| 66 | 66 | ]))->render(); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $seederPath = $this->laravel['modules']->config('paths.generator.listener'); |
| 74 | 74 | |
| 75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; |
|
| 75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -94,13 +94,13 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | protected function getEventName(Module $module) |
| 96 | 96 | { |
| 97 | - return $this->getClassNamespace($module) . "\\" . config('modules.paths.generator.event') . "\\" . $this->option('event'); |
|
| 97 | + return $this->getClassNamespace($module)."\\".config('modules.paths.generator.event')."\\".$this->option('event'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | private function getNamespace($module) |
| 101 | 101 | { |
| 102 | 102 | $namespace = str_replace('/', '\\', config('modules.paths.generator.listener')); |
| 103 | 103 | |
| 104 | - return $this->getClassNamespace($module) . "\\" . $namespace; |
|
| 104 | + return $this->getClassNamespace($module)."\\".$namespace; |
|
| 105 | 105 | } |
| 106 | 106 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | $generatorPath = $this->laravel['modules']->config('paths.generator.provider'); |
| 70 | 70 | |
| 71 | - return $path . $generatorPath . '/' . $this->getFileName() . '.php'; |
|
| 71 | + return $path.$generatorPath.'/'.$this->getFileName().'.php'; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
| 58 | 58 | |
| 59 | 59 | return (new Stub('/event.stub', [ |
| 60 | - 'NAMESPACE' => $this->getClassNamespace($module) . "\\" . config('modules.paths.generator.event'), |
|
| 60 | + 'NAMESPACE' => $this->getClassNamespace($module)."\\".config('modules.paths.generator.event'), |
|
| 61 | 61 | "CLASS" => $this->getClass(), |
| 62 | - 'DUMMYNAMESPACE' => $this->laravel->getNamespace() . 'Events', |
|
| 62 | + 'DUMMYNAMESPACE' => $this->laravel->getNamespace().'Events', |
|
| 63 | 63 | ]))->render(); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
| 69 | 69 | $seederPath = $this->laravel['modules']->config('paths.generator.event'); |
| 70 | 70 | |
| 71 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; |
|
| 71 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -86,11 +86,11 @@ |
||
| 86 | 86 | |
| 87 | 87 | $namespace = $this->laravel['modules']->config('namespace'); |
| 88 | 88 | |
| 89 | - $namespace .= '\\' . $module->getStudlyName(); |
|
| 89 | + $namespace .= '\\'.$module->getStudlyName(); |
|
| 90 | 90 | |
| 91 | - $namespace .= '\\' . $this->getDefaultNamespace(); |
|
| 91 | + $namespace .= '\\'.$this->getDefaultNamespace(); |
|
| 92 | 92 | |
| 93 | - $namespace .= '\\' . $extra; |
|
| 93 | + $namespace .= '\\'.$extra; |
|
| 94 | 94 | |
| 95 | 95 | return rtrim($namespace, '\\'); |
| 96 | 96 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | foreach (array_reverse($this->laravel['modules']->all()) as $module) { |
| 45 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
| 45 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
| 46 | 46 | |
| 47 | 47 | $this->reset($module); |
| 48 | 48 | } |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | |
| 99 | 99 | $namespace = $this->laravel['modules']->config('namespace'); |
| 100 | 100 | |
| 101 | - return $namespace . '\\' . $name . '\Database\Seeders\\' . $name . 'DatabaseSeeder'; |
|
| 101 | + return $namespace.'\\'.$name.'\Database\Seeders\\'.$name.'DatabaseSeeder'; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | protected function loadMigrationFiles($module) |
| 13 | 13 | { |
| 14 | - $path = $this->laravel['modules']->getModulePath($module) . $this->getMigrationGeneratorPath(); |
|
| 14 | + $path = $this->laravel['modules']->getModulePath($module).$this->getMigrationGeneratorPath(); |
|
| 15 | 15 | |
| 16 | - $files = $this->laravel['files']->glob($path . '/*_*.php'); |
|
| 16 | + $files = $this->laravel['files']->glob($path.'/*_*.php'); |
|
| 17 | 17 | |
| 18 | 18 | foreach ($files as $file) { |
| 19 | 19 | $this->laravel['files']->requireOnce($file); |