@@ -80,7 +80,7 @@ |
||
| 80 | 80 | $testPath = GenerateConfigReader::read('test'); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return $path . $testPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 83 | + return $path.$testPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | $generatorPath = GenerateConfigReader::read('provider'); |
| 88 | 88 | |
| 89 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 89 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | protected function getWebRoutesPath() |
| 96 | 96 | { |
| 97 | - return '/' . $this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php'); |
|
| 97 | + return '/'.$this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected function getApiRoutesPath() |
| 104 | 104 | { |
| 105 | - return '/' . $this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php'); |
|
| 105 | + return '/'.$this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php'); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | public function getDefaultNamespace() : string |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | foreach ($this->module->getOrdered($this->option('direction')) as $module) { |
| 50 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
| 50 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
| 51 | 51 | |
| 52 | 52 | $this->migrate($module); |
| 53 | 53 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $path = str_replace(base_path(), '', (new Migrator($module, $this->getLaravel()))->getPath()); |
| 64 | 64 | |
| 65 | 65 | if ($this->option('subpath')) { |
| 66 | - $path = $path . "/" . $this->option("subpath"); |
|
| 66 | + $path = $path."/".$this->option("subpath"); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $this->call('migrate', [ |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function setupStubPath() |
| 33 | 33 | { |
| 34 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
| 34 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
| 35 | 35 | |
| 36 | 36 | if (app('modules')->config('stubs.enabled') === true) { |
| 37 | 37 | Stub::setBasePath(app('modules')->config('stubs.path')); |
@@ -43,14 +43,14 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | protected function registerServices() |
| 45 | 45 | { |
| 46 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
| 46 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
| 47 | 47 | $path = $app['config']->get('modules.paths.modules'); |
| 48 | 48 | |
| 49 | 49 | return new Lumen\LumenFileRepository($app, $path); |
| 50 | 50 | }); |
| 51 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
| 51 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
| 52 | 52 | $activator = $app['config']->get('modules.activator'); |
| 53 | - $class = $app['config']->get('modules.activators.' . $activator)['class']; |
|
| 53 | + $class = $app['config']->get('modules.activators.'.$activator)['class']; |
|
| 54 | 54 | |
| 55 | 55 | return new $class($app); |
| 56 | 56 | }); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $eventPath = GenerateConfigReader::read('event'); |
| 79 | 79 | |
| 80 | - return $this->getClassNamespace($module) . "\\" . $eventPath->getPath() . "\\" . $this->option('event'); |
|
| 80 | + return $this->getClassNamespace($module)."\\".$eventPath->getPath()."\\".$this->option('event'); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | protected function getDestinationFilePath() |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | $listenerPath = GenerateConfigReader::read('listener'); |
| 88 | 88 | |
| 89 | - return $path . $listenerPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 89 | + return $path.$listenerPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | return $this->readJson(); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function () { |
|
| 82 | + return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function() { |
|
| 83 | 83 | return $this->readJson(); |
| 84 | 84 | }); |
| 85 | 85 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | private function config(string $key, $default = null) |
| 103 | 103 | { |
| 104 | - return $this->config->get('modules.activators.file.' . $key, $default); |
|
| 104 | + return $this->config->get('modules.activators.file.'.$key, $default); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function getCachedServicesPath(): string |
| 17 | 17 | { |
| 18 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
| 18 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function getCachedServicesPath(): string |
| 14 | 14 | { |
| 15 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->basePath('storage/app/') . 'services.php'); |
|
| 15 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->basePath('storage/app/').'services.php'); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | /** |
@@ -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('order') === $b->get('order')) { |
| 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 | } |