@@ -428,7 +428,7 @@ |
||
| 428 | 428 | ]+$options); |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | - if (GenerateConfigReader::read('model')->generate() === true) { |
|
| 431 | + if (GenerateConfigReader::read('model')->generate() === true) { |
|
| 432 | 432 | $options = []; |
| 433 | 433 | $this->console->call('module:make-model', [ |
| 434 | 434 | 'model' => $this->getName(), |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | continue; |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
| 362 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
| 363 | 363 | |
| 364 | 364 | $this->filesystem->makeDirectory($path, 0755, true); |
| 365 | 365 | if (config('modules.stubs.gitkeep')) { |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | */ |
| 376 | 376 | public function generateGitKeep($path) |
| 377 | 377 | { |
| 378 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
| 378 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | /** |
@@ -384,9 +384,9 @@ discard block |
||
| 384 | 384 | public function generateFiles() |
| 385 | 385 | { |
| 386 | 386 | foreach ($this->getFiles() as $stub => $file) { |
| 387 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
| 387 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
| 388 | 388 | |
| 389 | - $this->component->task("Generating file {$path}",function () use ($stub, $path) { |
|
| 389 | + $this->component->task("Generating file {$path}", function() use ($stub, $path) { |
|
| 390 | 390 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 391 | 391 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 392 | 392 | } |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | |
| 412 | 412 | if (GenerateConfigReader::read('provider')->generate() === true) { |
| 413 | 413 | $this->console->call('module:make-provider', [ |
| 414 | - 'name' => $this->getName() . 'ServiceProvider', |
|
| 414 | + 'name' => $this->getName().'ServiceProvider', |
|
| 415 | 415 | 'module' => $this->getName(), |
| 416 | 416 | '--master' => true, |
| 417 | 417 | ]); |
@@ -421,11 +421,11 @@ discard block |
||
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | if (GenerateConfigReader::read('controller')->generate() === true) { |
| 424 | - $options = $this->type=='api' ? ['--api'=>true] : []; |
|
| 424 | + $options = $this->type == 'api' ? ['--api'=>true] : []; |
|
| 425 | 425 | $this->console->call('module:make-controller', [ |
| 426 | - 'controller' => $this->getName() . 'Controller', |
|
| 426 | + 'controller' => $this->getName().'Controller', |
|
| 427 | 427 | 'module' => $this->getName(), |
| 428 | - ]+$options); |
|
| 428 | + ] + $options); |
|
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | if (GenerateConfigReader::read('model')->generate() === true) { |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $this->console->call('module:make-model', [ |
| 434 | 434 | 'model' => $this->getName(), |
| 435 | 435 | 'module' => $this->getName(), |
| 436 | - ]+$options); |
|
| 436 | + ] + $options); |
|
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | 439 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | protected function getStubContents($stub) |
| 448 | 448 | { |
| 449 | 449 | return (new Stub( |
| 450 | - '/' . $stub . '.stub', |
|
| 450 | + '/'.$stub.'.stub', |
|
| 451 | 451 | $this->getReplacement($stub) |
| 452 | 452 | ) |
| 453 | 453 | )->render(); |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | } |
| 487 | 487 | } |
| 488 | 488 | foreach ($keys as $key) { |
| 489 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
| 489 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
| 490 | 490 | $replaces[$key] = $this->$method(); |
| 491 | 491 | } else { |
| 492 | 492 | $replaces[$key] = null; |
@@ -501,9 +501,9 @@ discard block |
||
| 501 | 501 | */ |
| 502 | 502 | private function generateModuleJsonFile() |
| 503 | 503 | { |
| 504 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 504 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 505 | 505 | |
| 506 | - $this->component->task("Generating file $path",function () use ($path) { |
|
| 506 | + $this->component->task("Generating file $path", function() use ($path) { |
|
| 507 | 507 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
| 508 | 508 | $this->filesystem->makeDirectory($dir, 0775, true); |
| 509 | 509 | } |
@@ -518,13 +518,13 @@ discard block |
||
| 518 | 518 | */ |
| 519 | 519 | private function cleanModuleJsonFile() |
| 520 | 520 | { |
| 521 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
| 521 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
| 522 | 522 | |
| 523 | 523 | $content = $this->filesystem->get($path); |
| 524 | 524 | $namespace = $this->getModuleNamespaceReplacement(); |
| 525 | 525 | $studlyName = $this->getStudlyNameReplacement(); |
| 526 | 526 | |
| 527 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
| 527 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
| 528 | 528 | |
| 529 | 529 | $content = str_replace($provider, '', $content); |
| 530 | 530 | |