@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | continue; |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
| 334 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
| 335 | 335 | |
| 336 | 336 | $this->filesystem->makeDirectory($path, 0755, true); |
| 337 | 337 | if (config('modules.stubs.gitkeep')) { |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | */ |
| 348 | 348 | public function generateGitKeep($path) |
| 349 | 349 | { |
| 350 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
| 350 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | /** |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | public function generateFiles() |
| 357 | 357 | { |
| 358 | 358 | foreach ($this->getFiles() as $stub => $file) { |
| 359 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
| 359 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
| 360 | 360 | |
| 361 | 361 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 362 | 362 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | |
| 384 | 384 | if (GenerateConfigReader::read('provider')->generate() === true) { |
| 385 | 385 | $this->console->call('module:make-provider', [ |
| 386 | - 'name' => $this->getName() . 'ServiceProvider', |
|
| 386 | + 'name' => $this->getName().'ServiceProvider', |
|
| 387 | 387 | 'module' => $this->getName(), |
| 388 | 388 | '--master' => true, |
| 389 | 389 | ]); |
@@ -393,11 +393,11 @@ discard block |
||
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | if (GenerateConfigReader::read('controller')->generate() === true) { |
| 396 | - $options = $this->type=='api'?['--api'=>true]:[]; |
|
| 396 | + $options = $this->type == 'api' ? ['--api'=>true] : []; |
|
| 397 | 397 | $this->console->call('module:make-controller', [ |
| 398 | - 'controller' => $this->getName() . 'Controller', |
|
| 398 | + 'controller' => $this->getName().'Controller', |
|
| 399 | 399 | 'module' => $this->getName(), |
| 400 | - ]+$options); |
|
| 400 | + ] + $options); |
|
| 401 | 401 | } |
| 402 | 402 | } |
| 403 | 403 | |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | protected function getStubContents($stub) |
| 412 | 412 | { |
| 413 | 413 | return (new Stub( |
| 414 | - '/' . $stub . '.stub', |
|
| 414 | + '/'.$stub.'.stub', |
|
| 415 | 415 | $this->getReplacement($stub) |
| 416 | 416 | ) |
| 417 | 417 | )->render(); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | } |
| 451 | 451 | } |
| 452 | 452 | foreach ($keys as $key) { |
| 453 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
| 453 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
| 454 | 454 | $replaces[$key] = $this->$method(); |
| 455 | 455 | } else { |
| 456 | 456 | $replaces[$key] = null; |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | */ |
| 466 | 466 | private function generateModuleJsonFile() |
| 467 | 467 | { |
| 468 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 468 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 469 | 469 | |
| 470 | 470 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 471 | 471 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -482,13 +482,13 @@ discard block |
||
| 482 | 482 | */ |
| 483 | 483 | private function cleanModuleJsonFile() |
| 484 | 484 | { |
| 485 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 485 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 486 | 486 | |
| 487 | 487 | $content = $this->filesystem->get($path); |
| 488 | 488 | $namespace = $this->getModuleNamespaceReplacement(); |
| 489 | 489 | $studlyName = $this->getStudlyNameReplacement(); |
| 490 | 490 | |
| 491 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
| 491 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
| 492 | 492 | |
| 493 | 493 | $content = str_replace($provider, '', $content); |
| 494 | 494 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | protected function writeComponentViewTemplate() |
| 51 | 51 | { |
| 52 | - $this->call('module:make-component-view', ['name' => $this->argument('name') , 'module' => $this->argument('module')]); |
|
| 52 | + $this->call('module:make-component-view', ['name' => $this->argument('name'), 'module' => $this->argument('module')]); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | public function getDefaultNamespace() : string |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | 'NAMESPACE' => $this->getClassNamespace($module), |
| 83 | 83 | 'CLASS' => $this->getClass(), |
| 84 | 84 | 'LOWER_NAME' => $module->getLowerName(), |
| 85 | - 'COMPONENT_NAME' => 'components.' . Str::lower($this->argument('name')), |
|
| 85 | + 'COMPONENT_NAME' => 'components.'.Str::lower($this->argument('name')), |
|
| 86 | 86 | ]))->render(); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
| 95 | 95 | $factoryPath = GenerateConfigReader::read('component-class'); |
| 96 | 96 | |
| 97 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
| 97 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -102,6 +102,6 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | private function getFileName() |
| 104 | 104 | { |
| 105 | - return Str::studly($this->argument('name')) . '.php'; |
|
| 105 | + return Str::studly($this->argument('name')).'.php'; |
|
| 106 | 106 | } |
| 107 | 107 | } |
@@ -76,10 +76,10 @@ |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * Get module type . |
|
| 80 | - * |
|
| 81 | - * @return string |
|
| 82 | - */ |
|
| 79 | + * Get module type . |
|
| 80 | + * |
|
| 81 | + * @return string |
|
| 82 | + */ |
|
| 83 | 83 | private function getModuleType() |
| 84 | 84 | { |
| 85 | 85 | $isPlain = $this->option('plain'); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
| 64 | 64 | $factoryPath = GenerateConfigReader::read('component-view'); |
| 65 | 65 | |
| 66 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
| 66 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -71,6 +71,6 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | private function getFileName() |
| 73 | 73 | { |
| 74 | - return Str::lower($this->argument('name')) . '.blade.php'; |
|
| 74 | + return Str::lower($this->argument('name')).'.blade.php'; |
|
| 75 | 75 | } |
| 76 | 76 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $this->setupStubPath(); |
| 27 | 27 | $this->registerProviders(); |
| 28 | 28 | |
| 29 | - $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'modules'); |
|
| 29 | + $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'modules'); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function setupStubPath() |
| 36 | 36 | { |
| 37 | - $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__ . '/Commands/stubs'; |
|
| 37 | + $path = $this->app['config']->get('modules.stubs.path') ?? __DIR__.'/Commands/stubs'; |
|
| 38 | 38 | Stub::setBasePath($path); |
| 39 | 39 | |
| 40 | - $this->app->booted(function ($app) { |
|
| 40 | + $this->app->booted(function($app) { |
|
| 41 | 41 | /** @var RepositoryInterface $moduleRepository */ |
| 42 | 42 | $moduleRepository = $app[RepositoryInterface::class]; |
| 43 | 43 | if ($moduleRepository->config('stubs.enabled') === true) { |
@@ -51,14 +51,14 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | protected function registerServices() |
| 53 | 53 | { |
| 54 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
| 54 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
| 55 | 55 | $path = $app['config']->get('modules.paths.modules'); |
| 56 | 56 | |
| 57 | 57 | return new Laravel\LaravelFileRepository($app, $path); |
| 58 | 58 | }); |
| 59 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
| 59 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
| 60 | 60 | $activator = $app['config']->get('modules.activator'); |
| 61 | - $class = $app['config']->get('modules.activators.' . $activator)['class']; |
|
| 61 | + $class = $app['config']->get('modules.activators.'.$activator)['class']; |
|
| 62 | 62 | |
| 63 | 63 | if ($class === null) { |
| 64 | 64 | throw InvalidActivatorClass::missingConfig(); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | protected function registerNamespaces() |
| 38 | 38 | { |
| 39 | - $configPath = __DIR__ . '/../config/config.php'; |
|
| 39 | + $configPath = __DIR__.'/../config/config.php'; |
|
| 40 | 40 | |
| 41 | 41 | $this->publishes([ |
| 42 | 42 | $configPath => config_path('modules.php'), |