Completed
Pull Request — master (#1473)
by
unknown
06:07
created
src/Generators/ModuleGenerator.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 }
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 
414 414
         if (GenerateConfigReader::read('provider')->generate() === true) {
415 415
             $this->console->call('module:make-provider', [
416
-                'name' => $this->getName() . 'ServiceProvider',
416
+                'name' => $this->getName().'ServiceProvider',
417 417
                 'module' => $this->getName(),
418 418
                 '--master' => true,
419 419
             ]);
@@ -423,11 +423,11 @@  discard block
 block discarded – undo
423 423
         }
424 424
 
425 425
         if (GenerateConfigReader::read('controller')->generate() === true) {
426
-            $options = $this->type=='api' ? ['--api'=>true] : [];
426
+            $options = $this->type == 'api' ? ['--api'=>true] : [];
427 427
             $this->console->call('module:make-controller', [
428
-                'controller' => $this->getName() . 'Controller',
428
+                'controller' => $this->getName().'Controller',
429 429
                 'module' => $this->getName(),
430
-            ]+$options);
430
+            ] + $options);
431 431
         }
432 432
     }
433 433
 
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     protected function getStubContents($stub)
442 442
     {
443 443
         return (new Stub(
444
-            '/' . $stub . '.stub',
444
+            '/'.$stub.'.stub',
445 445
             $this->getReplacement($stub)
446 446
         )
447 447
         )->render();
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
             }
481 481
         }
482 482
         foreach ($keys as $key) {
483
-            if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) {
483
+            if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) {
484 484
                 $replaces[$key] = $this->$method();
485 485
             } else {
486 486
                 $replaces[$key] = null;
@@ -495,9 +495,9 @@  discard block
 block discarded – undo
495 495
      */
496 496
     private function generateModuleJsonFile()
497 497
     {
498
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
498
+        $path = $this->module->getModulePath($this->getName()).'module.json';
499 499
 
500
-        $this->component->task("Generating file $path",function () use ($path) {
500
+        $this->component->task("Generating file $path", function() use ($path) {
501 501
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
502 502
                 $this->filesystem->makeDirectory($dir, 0775, true);
503 503
             }
@@ -512,13 +512,13 @@  discard block
 block discarded – undo
512 512
      */
513 513
     private function cleanModuleJsonFile()
514 514
     {
515
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
515
+        $path = $this->module->getModulePath($this->getName()).'module.json';
516 516
 
517 517
         $content = $this->filesystem->get($path);
518 518
         $namespace = $this->getModuleNamespaceReplacement();
519 519
         $studlyName = $this->getStudlyNameReplacement();
520 520
 
521
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
521
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
522 522
 
523 523
         $content = str_replace($provider, '', $content);
524 524
 
Please login to merge, or discard this patch.