@@ -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,11 +384,11 @@ discard block |
||
384 | 384 | public function generateFiles() |
385 | 385 | { |
386 | 386 | foreach ($this->getFiles() as $stub => $file) { |
387 | - $file = str_replace('$LOWER_NAME$',$this->getLowerNameReplacement(),$file); |
|
388 | - $file = str_replace('$STUDLY_NAME$', $this->getName(),$file); |
|
389 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
387 | + $file = str_replace('$LOWER_NAME$', $this->getLowerNameReplacement(), $file); |
|
388 | + $file = str_replace('$STUDLY_NAME$', $this->getName(), $file); |
|
389 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
390 | 390 | |
391 | - $this->component->task("Generating file {$path}",function () use ($stub, $path) { |
|
391 | + $this->component->task("Generating file {$path}", function() use ($stub, $path) { |
|
392 | 392 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
393 | 393 | $this->filesystem->makeDirectory($dir, 0775, true); |
394 | 394 | } |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | |
416 | 416 | if (GenerateConfigReader::read('provider')->generate() === true) { |
417 | 417 | $this->console->call('module:make-provider', [ |
418 | - 'name' => $this->getName() . 'ServiceProvider', |
|
418 | + 'name' => $this->getName().'ServiceProvider', |
|
419 | 419 | 'module' => $this->getName(), |
420 | 420 | '--master' => true, |
421 | 421 | ]); |
@@ -425,11 +425,11 @@ discard block |
||
425 | 425 | } |
426 | 426 | |
427 | 427 | if (GenerateConfigReader::read('controller')->generate() === true) { |
428 | - $options = $this->type=='api' ? ['--api'=>true] : []; |
|
428 | + $options = $this->type == 'api' ? ['--api'=>true] : []; |
|
429 | 429 | $this->console->call('module:make-controller', [ |
430 | - 'controller' => $this->getName() . 'Controller', |
|
430 | + 'controller' => $this->getName().'Controller', |
|
431 | 431 | 'module' => $this->getName(), |
432 | - ]+$options); |
|
432 | + ] + $options); |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | if (GenerateConfigReader::read('model')->generate() === true) { |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | $this->console->call('module:make-model', [ |
438 | 438 | 'model' => $this->getName().$modelNameSuffix, |
439 | 439 | 'module' => $this->getName(), |
440 | - ]+$options); |
|
440 | + ] + $options); |
|
441 | 441 | } |
442 | 442 | |
443 | 443 | if (GenerateConfigReader::read('factory')->generate() === true) { |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | 'name' => $this->getName(), |
447 | 447 | 'model' => $this->getName().$modelNameSuffix, |
448 | 448 | 'module' => $this->getName(), |
449 | - ]+$options); |
|
449 | + ] + $options); |
|
450 | 450 | } |
451 | 451 | |
452 | 452 | if (GenerateConfigReader::read('migration')->generate() === true) { |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $this->console->call('module:make-migration', [ |
455 | 455 | 'name' => 'create_'.$this->getLowerNameReplacement().'_table', |
456 | 456 | 'module' => $this->getName(), |
457 | - ]+$options); |
|
457 | + ] + $options); |
|
458 | 458 | } |
459 | 459 | } |
460 | 460 | |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | protected function getStubContents($stub) |
469 | 469 | { |
470 | 470 | return (new Stub( |
471 | - '/' . $stub . '.stub', |
|
471 | + '/'.$stub.'.stub', |
|
472 | 472 | $this->getReplacement() |
473 | 473 | ) |
474 | 474 | )->render(); |
@@ -479,9 +479,9 @@ discard block |
||
479 | 479 | */ |
480 | 480 | private function generateModuleJsonFile() |
481 | 481 | { |
482 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
482 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
483 | 483 | |
484 | - $this->component->task("Generating file $path",function () use ($path) { |
|
484 | + $this->component->task("Generating file $path", function() use ($path) { |
|
485 | 485 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
486 | 486 | $this->filesystem->makeDirectory($dir, 0775, true); |
487 | 487 | } |
@@ -496,13 +496,13 @@ discard block |
||
496 | 496 | */ |
497 | 497 | private function cleanModuleJsonFile() |
498 | 498 | { |
499 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
499 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
500 | 500 | |
501 | 501 | $content = $this->filesystem->get($path); |
502 | 502 | $namespace = $this->getModuleNamespaceReplacement(); |
503 | 503 | $studlyName = $this->getStudlyNameReplacement(); |
504 | 504 | |
505 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
505 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
506 | 506 | |
507 | 507 | $content = str_replace($provider, '', $content); |
508 | 508 |