@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | if ( |
141 | 141 | $this->config->get('modules.suffix.enabled') === false |
142 | - || ($folderSuffix && $this->config->get('modules.suffix.apply-to-folder') === false) |
|
142 | + || ($folderSuffix && $this->config->get('modules.suffix.apply-to-folder') === false) |
|
143 | 143 | ) { |
144 | 144 | return ''; |
145 | 145 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | continue; |
363 | 363 | } |
364 | 364 | |
365 | - $path = $this->module->getModulePath($this->getFolderName()) . '/' . $folder->getPath(); |
|
365 | + $path = $this->module->getModulePath($this->getFolderName()).'/'.$folder->getPath(); |
|
366 | 366 | |
367 | 367 | $this->filesystem->makeDirectory($path, 0755, true); |
368 | 368 | if (config('modules.stubs.gitkeep')) { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | */ |
379 | 379 | public function generateGitKeep($path) |
380 | 380 | { |
381 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
381 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
382 | 382 | } |
383 | 383 | |
384 | 384 | /** |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | public function generateFiles() |
388 | 388 | { |
389 | 389 | foreach ($this->getFiles() as $stub => $file) { |
390 | - $path = $this->module->getModulePath($this->getFolderName()) . $file; |
|
390 | + $path = $this->module->getModulePath($this->getFolderName()).$file; |
|
391 | 391 | |
392 | 392 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
393 | 393 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | if (GenerateConfigReader::read('provider')->generate() === true) { |
416 | 416 | $this->console->call('module:make-provider', [ |
417 | - 'name' => $this->getName() . 'ServiceProvider', |
|
417 | + 'name' => $this->getName().'ServiceProvider', |
|
418 | 418 | 'module' => $this->getName(), |
419 | 419 | '--master' => true, |
420 | 420 | ]); |
@@ -424,11 +424,11 @@ discard block |
||
424 | 424 | } |
425 | 425 | |
426 | 426 | if (GenerateConfigReader::read('controller')->generate() === true) { |
427 | - $options = $this->type=='api'?['--api'=>true]:[]; |
|
427 | + $options = $this->type == 'api' ? ['--api'=>true] : []; |
|
428 | 428 | $this->console->call('module:make-controller', [ |
429 | - 'controller' => $this->getName() . 'Controller', |
|
429 | + 'controller' => $this->getName().'Controller', |
|
430 | 430 | 'module' => $this->getName(), |
431 | - ]+$options); |
|
431 | + ] + $options); |
|
432 | 432 | } |
433 | 433 | } |
434 | 434 | |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | protected function getStubContents($stub) |
443 | 443 | { |
444 | 444 | return (new Stub( |
445 | - '/' . $stub . '.stub', |
|
445 | + '/'.$stub.'.stub', |
|
446 | 446 | $this->getReplacement($stub) |
447 | 447 | ) |
448 | 448 | )->render(); |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | } |
482 | 482 | } |
483 | 483 | foreach ($keys as $key) { |
484 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
484 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
485 | 485 | $replaces[$key] = $this->$method(); |
486 | 486 | } else { |
487 | 487 | $replaces[$key] = null; |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | */ |
497 | 497 | private function generateModuleJsonFile() |
498 | 498 | { |
499 | - $path = $this->module->getModulePath($this->getFolderName()) . 'module.json'; |
|
499 | + $path = $this->module->getModulePath($this->getFolderName()).'module.json'; |
|
500 | 500 | |
501 | 501 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
502 | 502 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -513,13 +513,13 @@ discard block |
||
513 | 513 | */ |
514 | 514 | private function cleanModuleJsonFile() |
515 | 515 | { |
516 | - $path = $this->module->getModulePath($this->getFolderName()) . 'module.json'; |
|
516 | + $path = $this->module->getModulePath($this->getFolderName()).'module.json'; |
|
517 | 517 | |
518 | 518 | $content = $this->filesystem->get($path); |
519 | 519 | $namespace = $this->getModuleNamespaceReplacement(); |
520 | 520 | $studlyName = $this->getStudlyNameReplacement(); |
521 | 521 | |
522 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
522 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
523 | 523 | |
524 | 524 | $content = str_replace($provider, '', $content); |
525 | 525 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** @var Module $module */ |
78 | 78 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
79 | 79 | |
80 | - return (new Stub('/' . $stub . '.stub', [ |
|
80 | + return (new Stub('/'.$stub.'.stub', [ |
|
81 | 81 | 'NAMESPACE' => $this->getClassNamespace($module), |
82 | 82 | 'CLASS' => $this->getClass(), |
83 | 83 | 'LOWER_NAME' => $module->getKekabName(), |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $generatorPath = GenerateConfigReader::read('provider'); |
104 | 104 | |
105 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
105 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -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->getKekabName(), |
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 | } |