@@ -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->ensureDirectoryExists($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 | } |
@@ -412,14 +412,14 @@ discard block |
||
412 | 412 | $providerGenerator = GenerateConfigReader::read('provider'); |
413 | 413 | if ($providerGenerator->generate() === true) { |
414 | 414 | $this->console->call('module:make-provider', [ |
415 | - 'name' => $this->getName() . 'ServiceProvider', |
|
415 | + 'name' => $this->getName().'ServiceProvider', |
|
416 | 416 | 'module' => $this->getName(), |
417 | 417 | '--master' => true, |
418 | 418 | ]); |
419 | 419 | } else { |
420 | 420 | // delete register ServiceProvider on module.json |
421 | - $path = $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . 'module.json'; |
|
422 | - $module_file = $this->filesystem->get($path); |
|
421 | + $path = $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.'module.json'; |
|
422 | + $module_file = $this->filesystem->get($path); |
|
423 | 423 | $this->filesystem->put( |
424 | 424 | $path, |
425 | 425 | preg_replace('/"providers": \[.*?\],/s', '"providers": [ ],', $module_file) |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | $this->filesystem->replaceInFile( |
441 | 441 | '$this->app->register(Route', |
442 | 442 | '// $this->app->register(Route', |
443 | - $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . $providerGenerator->getPath() . DIRECTORY_SEPARATOR . sprintf('%sServiceProvider.php', $this->getName()) |
|
443 | + $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.$providerGenerator->getPath().DIRECTORY_SEPARATOR.sprintf('%sServiceProvider.php', $this->getName()) |
|
444 | 444 | ); |
445 | 445 | } |
446 | 446 | } |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | if (GenerateConfigReader::read('controller')->generate() === true) { |
449 | 449 | $options = $this->type == 'api' ? ['--api' => true] : []; |
450 | 450 | $this->console->call('module:make-controller', [ |
451 | - 'controller' => $this->getName() . 'Controller', |
|
451 | + 'controller' => $this->getName().'Controller', |
|
452 | 452 | 'module' => $this->getName(), |
453 | 453 | ] + $options); |
454 | 454 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | protected function getStubContents($stub) |
465 | 465 | { |
466 | 466 | return (new Stub( |
467 | - '/' . $stub . '.stub', |
|
467 | + '/'.$stub.'.stub', |
|
468 | 468 | $this->getReplacement($stub) |
469 | 469 | ) |
470 | 470 | )->render(); |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | } |
504 | 504 | } |
505 | 505 | foreach ($keys as $key) { |
506 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
506 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
507 | 507 | $replaces[$key] = $this->$method(); |
508 | 508 | } else { |
509 | 509 | $replaces[$key] = null; |
@@ -518,9 +518,9 @@ discard block |
||
518 | 518 | */ |
519 | 519 | private function generateModuleJsonFile() |
520 | 520 | { |
521 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
521 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
522 | 522 | |
523 | - $this->component->task("Generating file $path", function () use ($path) { |
|
523 | + $this->component->task("Generating file $path", function() use ($path) { |
|
524 | 524 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
525 | 525 | $this->filesystem->makeDirectory($dir, 0775, true); |
526 | 526 | } |
@@ -535,13 +535,13 @@ discard block |
||
535 | 535 | */ |
536 | 536 | private function cleanModuleJsonFile() |
537 | 537 | { |
538 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
538 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
539 | 539 | |
540 | 540 | $content = $this->filesystem->get($path); |
541 | 541 | $namespace = $this->getModuleNamespaceReplacement(); |
542 | 542 | $studlyName = $this->getStudlyNameReplacement(); |
543 | 543 | |
544 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
544 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
545 | 545 | |
546 | 546 | $content = str_replace($provider, '', $content); |
547 | 547 |