Completed
Pull Request — master (#1474)
by
unknown
08:49
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
                 }
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
     protected function getStubContents($stub)
452 452
     {
453 453
         return (new Stub(
454
-            '/' . $stub . '.stub',
454
+            '/'.$stub.'.stub',
455 455
             $this->getReplacement()
456 456
         )
457 457
         )->render();
@@ -462,9 +462,9 @@  discard block
 block discarded – undo
462 462
      */
463 463
     private function generateModuleJsonFile()
464 464
     {
465
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
465
+        $path = $this->module->getModulePath($this->getName()).'module.json';
466 466
 
467
-        $this->component->task("Generating file $path",function () use ($path) {
467
+        $this->component->task("Generating file $path", function() use ($path) {
468 468
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
469 469
                 $this->filesystem->makeDirectory($dir, 0775, true);
470 470
             }
@@ -479,13 +479,13 @@  discard block
 block discarded – undo
479 479
      */
480 480
     private function cleanModuleJsonFile()
481 481
     {
482
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
482
+        $path = $this->module->getModulePath($this->getName()).'module.json';
483 483
 
484 484
         $content = $this->filesystem->get($path);
485 485
         $namespace = $this->getModuleNamespaceReplacement();
486 486
         $studlyName = $this->getStudlyNameReplacement();
487 487
 
488
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
488
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
489 489
 
490 490
         $content = str_replace($provider, '', $content);
491 491
 
Please login to merge, or discard this patch.