@@ -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); |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | $this->filesystem->put($path, $this->getStubContents($stub)); |
| 366 | 366 | |
| 367 | - $this->console->info("Created " . basename($path)); |
|
| 367 | + $this->console->info("Created ".basename($path)); |
|
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 | |
@@ -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 | ]); |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | if (GenerateConfigReader::read('controller')->generate() === true) { |
| 396 | 396 | $this->console->call('module:make-controller', [ |
| 397 | - 'controller' => $this->getName() . 'Controller', |
|
| 397 | + 'controller' => $this->getName().'Controller', |
|
| 398 | 398 | 'module' => $this->getName(), |
| 399 | 399 | ]); |
| 400 | 400 | } |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | protected function getStubContents($stub) |
| 411 | 411 | { |
| 412 | 412 | return (new Stub( |
| 413 | - '/' . $stub . '.stub', |
|
| 413 | + '/'.$stub.'.stub', |
|
| 414 | 414 | $this->getReplacement($stub) |
| 415 | 415 | ))->render(); |
| 416 | 416 | } |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | } |
| 449 | 449 | } |
| 450 | 450 | foreach ($keys as $key) { |
| 451 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
| 451 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
| 452 | 452 | $replaces[$key] = $this->$method(); |
| 453 | 453 | } else { |
| 454 | 454 | $replaces[$key] = null; |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | */ |
| 464 | 464 | private function generateModuleJsonFile() |
| 465 | 465 | { |
| 466 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 466 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 467 | 467 | |
| 468 | 468 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 469 | 469 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | |
| 472 | 472 | $this->filesystem->put($path, $this->getStubContents('json')); |
| 473 | 473 | |
| 474 | - $this->console->info("Created " . basename($path)); |
|
| 474 | + $this->console->info("Created ".basename($path)); |
|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | /** |
@@ -480,13 +480,13 @@ discard block |
||
| 480 | 480 | */ |
| 481 | 481 | private function cleanModuleJsonFile() |
| 482 | 482 | { |
| 483 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 483 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 484 | 484 | |
| 485 | 485 | $content = $this->filesystem->get($path); |
| 486 | 486 | $namespace = $this->getModuleNamespaceReplacement(); |
| 487 | 487 | $studlyName = $this->getStudlyNameReplacement(); |
| 488 | 488 | |
| 489 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
| 489 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
| 490 | 490 | |
| 491 | 491 | $content = str_replace($provider, '', $content); |
| 492 | 492 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $overwriteFile = $this->hasOption('force') ? $this->option('force') : false; |
| 61 | 61 | (new FileGenerator($path, $contents))->withFileOverwrite($overwriteFile)->generate(); |
| 62 | - $this->info("Created " . basename($path) . " file"); |
|
| 62 | + $this->info("Created ".basename($path)." file"); |
|
| 63 | 63 | } catch (FileAlreadyExistException $e) { |
| 64 | 64 | |
| 65 | 65 | $this->critical("File [ {$path} ] already exists."); |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $namespace = $this->laravel['modules']->config('namespace'); |
| 106 | 106 | |
| 107 | - $namespace .= '\\' . $module->getStudlyName(); |
|
| 107 | + $namespace .= '\\'.$module->getStudlyName(); |
|
| 108 | 108 | |
| 109 | - $namespace .= '\\' . $this->getDefaultNamespace(); |
|
| 109 | + $namespace .= '\\'.$this->getDefaultNamespace(); |
|
| 110 | 110 | |
| 111 | - $namespace .= '\\' . $extra; |
|
| 111 | + $namespace .= '\\'.$extra; |
|
| 112 | 112 | |
| 113 | 113 | $namespace = str_replace('/', '\\', $namespace); |
| 114 | 114 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $json = new Json(module_path($this->getModule()->getStudlyName(), 'module.json')); |
| 46 | 46 | $providers = $json->get('providers', []); |
| 47 | 47 | |
| 48 | - $provider = $this->getClassNamespace($this->getModule()) . "\\" . $this->getFileName(); |
|
| 48 | + $provider = $this->getClassNamespace($this->getModule())."\\".$this->getFileName(); |
|
| 49 | 49 | |
| 50 | 50 | $json->set('providers', array_unique(array_merge($providers, [ |
| 51 | 51 | $provider |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | /** @var Module $module */ |
| 110 | 110 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
| 111 | 111 | |
| 112 | - return (new Stub('/' . $stub . '.stub', [ |
|
| 112 | + return (new Stub('/'.$stub.'.stub', [ |
|
| 113 | 113 | 'NAMESPACE' => $this->getClassNamespace($module), |
| 114 | 114 | 'CLASS' => $this->getClass(), |
| 115 | 115 | 'LOWER_NAME' => $module->getLowerName(), |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $generatorPath = GenerateConfigReader::read('provider'); |
| 136 | 136 | |
| 137 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 137 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Getter for appendable |
| 31 | 31 | * |
| 32 | - * @return void |
|
| 32 | + * @return null|string |
|
| 33 | 33 | */ |
| 34 | 34 | public function appendable() |
| 35 | 35 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * Getter for the stub file |
| 41 | 41 | * |
| 42 | - * @return void |
|
| 42 | + * @return null|string |
|
| 43 | 43 | */ |
| 44 | 44 | public function stubFile() |
| 45 | 45 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | /** |
| 62 | 62 | * Get stub file contents |
| 63 | 63 | * |
| 64 | - * @return mixed |
|
| 64 | + * @return string |
|
| 65 | 65 | */ |
| 66 | 66 | protected function getTemplateContents() |
| 67 | 67 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | /** |
| 72 | 72 | * Get destination file path. |
| 73 | 73 | * |
| 74 | - * @return mixed |
|
| 74 | + * @return string |
|
| 75 | 75 | */ |
| 76 | 76 | public function getDestinationFilePath() |
| 77 | 77 | { |
@@ -75,9 +75,9 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function getDestinationFilePath() |
| 77 | 77 | { |
| 78 | - return $this->getModulePath() . "/" . |
|
| 79 | - GenerateConfigReader::read($this->getGeneratorConfigKey())->getPath() . "/" . |
|
| 80 | - $this->resolveFilename() . '.' . $this->outputExtension; |
|
| 78 | + return $this->getModulePath()."/". |
|
| 79 | + GenerateConfigReader::read($this->getGeneratorConfigKey())->getPath()."/". |
|
| 80 | + $this->resolveFilename().'.'.$this->outputExtension; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |