@@ -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 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $seederPath = $this->laravel['modules']->config('paths.generator.seeder'); |
| 83 | 83 | |
| 84 | - return $path . $seederPath . '/' . $this->getSeederName() . '.php'; |
|
| 84 | + return $path.$seederPath.'/'.$this->getSeederName().'.php'; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -93,6 +93,6 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $end = $this->option('master') ? 'DatabaseSeeder' : 'TableSeeder'; |
| 95 | 95 | |
| 96 | - return Str::studly($this->argument('name')) . $end; |
|
| 96 | + return Str::studly($this->argument('name')).$end; |
|
| 97 | 97 | } |
| 98 | 98 | } |
@@ -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 | /** |
@@ -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 | /** |
@@ -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 | } |
@@ -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); |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setupStubPath() |
| 57 | 57 | { |
| 58 | - $this->app->booted(function ($app) { |
|
| 59 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
| 58 | + $this->app->booted(function($app) { |
|
| 59 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
| 60 | 60 | |
| 61 | 61 | if ($app['modules']->config('stubs.enabled') === true) { |
| 62 | 62 | Stub::setBasePath($app['modules']->config('stubs.path')); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | protected function registerNamespaces() |
| 71 | 71 | { |
| 72 | - $configPath = __DIR__ . '/../config/config.php'; |
|
| 72 | + $configPath = __DIR__.'/../config/config.php'; |
|
| 73 | 73 | $this->mergeConfigFrom($configPath, 'modules'); |
| 74 | 74 | $this->publishes([ |
| 75 | 75 | $configPath => config_path('modules.php'), |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function registerServices() |
| 99 | 99 | { |
| 100 | - $this->app->singleton('modules', function ($app) { |
|
| 100 | + $this->app->singleton('modules', function($app) { |
|
| 101 | 101 | $path = $app['config']->get('modules.paths.modules'); |
| 102 | 102 | |
| 103 | 103 | return new Repository($app, $path); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $process->setTimeout($this->timeout); |
| 136 | 136 | |
| 137 | 137 | if ($this->console instanceof Command) { |
| 138 | - $process->run(function ($type, $line) { |
|
| 138 | + $process->run(function($type, $line) { |
|
| 139 | 139 | $this->console->line($line); |
| 140 | 140 | }); |
| 141 | 141 | } |
@@ -239,10 +239,10 @@ discard block |
||
| 239 | 239 | public function getPackageName() |
| 240 | 240 | { |
| 241 | 241 | if (is_null($this->version)) { |
| 242 | - return $this->name . ':dev-master'; |
|
| 242 | + return $this->name.':dev-master'; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | - return $this->name . ':' . $this->version; |
|
| 245 | + return $this->name.':'.$this->version; |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /** |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | { |
| 160 | 160 | $lowerName = $this->getLowerName(); |
| 161 | 161 | |
| 162 | - $langPath = $this->getPath() . "/Resources/lang"; |
|
| 162 | + $langPath = $this->getPath()."/Resources/lang"; |
|
| 163 | 163 | |
| 164 | 164 | if (is_dir($langPath)) { |
| 165 | 165 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $file = 'module.json'; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - return new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
| 180 | + return new Json($this->getPath().'/'.$file, $this->app['files']); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /** |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | protected function fireEvent($event) |
| 229 | 229 | { |
| 230 | - $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
| 230 | + $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | protected function registerFiles() |
| 258 | 258 | { |
| 259 | 259 | foreach ($this->get('files', []) as $file) { |
| 260 | - include $this->path . '/' . $file; |
|
| 260 | + include $this->path.'/'.$file; |
|
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | */ |
| 381 | 381 | public function getExtraPath($path) |
| 382 | 382 | { |
| 383 | - return $this->getPath() . '/' . $path; |
|
| 383 | + return $this->getPath().'/'.$path; |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | /** |