@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $modules = []; |
| 40 | 40 | |
| 41 | 41 | foreach ($cached as $name => $module) { |
| 42 | - $path = $this->config('paths.modules') . '/' . $name; |
|
| 42 | + $path = $this->config('paths.modules').'/'.$name; |
|
| 43 | 43 | |
| 44 | 44 | $modules[$name] = new Module($this->app, $name, $path); |
| 45 | 45 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function getCachedServicesPath() |
| 16 | 16 | { |
| 17 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
| 17 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function getCachedServicesPath() |
| 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 | /** |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function setupStubPath() |
| 32 | 32 | { |
| 33 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
| 33 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
| 34 | 34 | |
| 35 | - $this->app->booted(function ($app) { |
|
| 35 | + $this->app->booted(function($app) { |
|
| 36 | 36 | if ($app['modules']->config('stubs.enabled') === true) { |
| 37 | 37 | Stub::setBasePath($app['modules']->config('stubs.path')); |
| 38 | 38 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | protected function registerServices() |
| 46 | 46 | { |
| 47 | - $this->app->singleton('modules', function ($app) { |
|
| 47 | + $this->app->singleton('modules', function($app) { |
|
| 48 | 48 | $path = $app['config']->get('modules.paths.modules'); |
| 49 | 49 | |
| 50 | 50 | return new \Nwidart\Modules\Laravel\Repository($app, $path); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function setupStubPath() |
| 32 | 32 | { |
| 33 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
| 33 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
| 34 | 34 | |
| 35 | 35 | if (app('modules')->config('stubs.enabled') === true) { |
| 36 | 36 | Stub::setBasePath(app('modules')->config('stubs.path')); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function registerServices() |
| 44 | 44 | { |
| 45 | - $this->app->singleton('modules', function ($app) { |
|
| 45 | + $this->app->singleton('modules', function($app) { |
|
| 46 | 46 | $path = $app['config']->get('modules.paths.modules'); |
| 47 | 47 | |
| 48 | 48 | return new \Nwidart\Modules\Lumen\Repository($app, $path); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | protected function registerNamespaces() |
| 45 | 45 | { |
| 46 | - $configPath = __DIR__ . '/../config/config.php'; |
|
| 46 | + $configPath = __DIR__.'/../config/config.php'; |
|
| 47 | 47 | |
| 48 | 48 | $this->mergeConfigFrom($configPath, 'modules'); |
| 49 | 49 | $this->publishes([ |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $modules = []; |
| 40 | 40 | |
| 41 | 41 | foreach ($cached as $name => $module) { |
| 42 | - $path = $this->config('paths.modules') . '/' . $name; |
|
| 42 | + $path = $this->config('paths.modules').'/'.$name; |
|
| 43 | 43 | |
| 44 | 44 | $modules[$name] = new Module($this->app, $name, $path); |
| 45 | 45 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | { |
| 187 | 187 | $lowerName = $this->getLowerName(); |
| 188 | 188 | |
| 189 | - $langPath = $this->getPath() . '/Resources/lang'; |
|
| 189 | + $langPath = $this->getPath().'/Resources/lang'; |
|
| 190 | 190 | |
| 191 | 191 | if (is_dir($langPath)) { |
| 192 | 192 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -206,8 +206,8 @@ discard block |
||
| 206 | 206 | $file = 'module.json'; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - return array_get($this->moduleJson, $file, function () use ($file) { |
|
| 210 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
| 209 | + return array_get($this->moduleJson, $file, function() use ($file) { |
|
| 210 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']); |
|
| 211 | 211 | }); |
| 212 | 212 | } |
| 213 | 213 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | */ |
| 259 | 259 | protected function fireEvent($event) |
| 260 | 260 | { |
| 261 | - $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
| 261 | + $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
| 262 | 262 | } |
| 263 | 263 | /** |
| 264 | 264 | * Register the aliases from this module. |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | protected function registerFiles() |
| 284 | 284 | { |
| 285 | 285 | foreach ($this->get('files', []) as $file) { |
| 286 | - include $this->path . '/' . $file; |
|
| 286 | + include $this->path.'/'.$file; |
|
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | */ |
| 407 | 407 | public function getExtraPath(string $path) : string |
| 408 | 408 | { |
| 409 | - return $this->getPath() . '/' . $path; |
|
| 409 | + return $this->getPath().'/'.$path; |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | /** |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | continue; |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
| 286 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
| 287 | 287 | |
| 288 | 288 | $this->filesystem->makeDirectory($path, 0755, true); |
| 289 | 289 | |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | */ |
| 299 | 299 | public function generateGitKeep($path) |
| 300 | 300 | { |
| 301 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
| 301 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | public function generateFiles() |
| 308 | 308 | { |
| 309 | 309 | foreach ($this->getFiles() as $stub => $file) { |
| 310 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
| 310 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
| 311 | 311 | |
| 312 | 312 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 313 | 313 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -331,13 +331,13 @@ discard block |
||
| 331 | 331 | ]); |
| 332 | 332 | |
| 333 | 333 | $this->console->call('module:make-provider', [ |
| 334 | - 'name' => $this->getName() . 'ServiceProvider', |
|
| 334 | + 'name' => $this->getName().'ServiceProvider', |
|
| 335 | 335 | 'module' => $this->getName(), |
| 336 | 336 | '--master' => true, |
| 337 | 337 | ]); |
| 338 | 338 | |
| 339 | 339 | $this->console->call('module:make-controller', [ |
| 340 | - 'controller' => $this->getName() . 'Controller', |
|
| 340 | + 'controller' => $this->getName().'Controller', |
|
| 341 | 341 | 'module' => $this->getName(), |
| 342 | 342 | ]); |
| 343 | 343 | } |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | protected function getStubContents($stub) |
| 353 | 353 | { |
| 354 | 354 | return (new Stub( |
| 355 | - '/' . $stub . '.stub', |
|
| 355 | + '/'.$stub.'.stub', |
|
| 356 | 356 | $this->getReplacement($stub) |
| 357 | 357 | ) |
| 358 | 358 | )->render(); |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $replaces = []; |
| 387 | 387 | |
| 388 | 388 | foreach ($keys as $key) { |
| 389 | - if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) { |
|
| 389 | + if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) { |
|
| 390 | 390 | $replaces[$key] = $this->$method(); |
| 391 | 391 | } else { |
| 392 | 392 | $replaces[$key] = null; |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | */ |
| 402 | 402 | private function generateModuleJsonFile() |
| 403 | 403 | { |
| 404 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 404 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 405 | 405 | |
| 406 | 406 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 407 | 407 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -418,13 +418,13 @@ discard block |
||
| 418 | 418 | */ |
| 419 | 419 | private function cleanModuleJsonFile() |
| 420 | 420 | { |
| 421 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 421 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 422 | 422 | |
| 423 | 423 | $content = $this->filesystem->get($path); |
| 424 | 424 | $namespace = $this->getModuleNamespaceReplacement(); |
| 425 | 425 | $studlyName = $this->getStudlyNameReplacement(); |
| 426 | 426 | |
| 427 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
| 427 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
| 428 | 428 | |
| 429 | 429 | $content = str_replace($provider, '', $content); |
| 430 | 430 | |
@@ -493,6 +493,6 @@ discard block |
||
| 493 | 493 | |
| 494 | 494 | protected function getRoutesLocationReplacement() |
| 495 | 495 | { |
| 496 | - return '/' . $this->module->config('stubs.files.routes'); |
|
| 496 | + return '/'.$this->module->config('stubs.files.routes'); |
|
| 497 | 497 | } |
| 498 | 498 | } |