Completed
Pull Request — master (#1474)
by
unknown
07:23
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
         if (GenerateConfigReader::read('model')->generate() === true) {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             $this->console->call('module:make-model', [
436 436
                     'model' => $this->getName(),
437 437
                     'module' => $this->getName(),
438
-                ]+$options);
438
+                ] + $options);
439 439
         }
440 440
     }
441 441
 
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
     protected function getStubContents($stub)
450 450
     {
451 451
         return (new Stub(
452
-            '/' . $stub . '.stub',
452
+            '/'.$stub.'.stub',
453 453
             $this->getReplacement()
454 454
         )
455 455
         )->render();
@@ -460,9 +460,9 @@  discard block
 block discarded – undo
460 460
      */
461 461
     private function generateModuleJsonFile()
462 462
     {
463
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
463
+        $path = $this->module->getModulePath($this->getName()).'module.json';
464 464
 
465
-        $this->component->task("Generating file $path",function () use ($path) {
465
+        $this->component->task("Generating file $path", function() use ($path) {
466 466
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
467 467
                 $this->filesystem->makeDirectory($dir, 0775, true);
468 468
             }
@@ -477,13 +477,13 @@  discard block
 block discarded – undo
477 477
      */
478 478
     private function cleanModuleJsonFile()
479 479
     {
480
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
480
+        $path = $this->module->getModulePath($this->getName()).'module.json';
481 481
 
482 482
         $content = $this->filesystem->get($path);
483 483
         $namespace = $this->getModuleNamespaceReplacement();
484 484
         $studlyName = $this->getStudlyNameReplacement();
485 485
 
486
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
486
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
487 487
 
488 488
         $content = str_replace($provider, '', $content);
489 489
 
Please login to merge, or discard this patch.