Completed
Pull Request — master (#1380)
by Felipe
07:16
created
src/Generators/ModuleGenerator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         if (
141 141
             $this->config->get('modules.suffix.enabled') === false
142
-            || ($folderSuffix && $this->config->get('modules.suffix.apply-to-folder')  === false)
142
+            || ($folderSuffix && $this->config->get('modules.suffix.apply-to-folder') === false)
143 143
         ) {
144 144
             return '';
145 145
         }
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
                 continue;
363 363
             }
364 364
 
365
-            $path = $this->module->getModulePath($this->getFolderName()) . '/' . $folder->getPath();
365
+            $path = $this->module->getModulePath($this->getFolderName()).'/'.$folder->getPath();
366 366
 
367 367
             $this->filesystem->makeDirectory($path, 0755, true);
368 368
             if (config('modules.stubs.gitkeep')) {
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
      */
379 379
     public function generateGitKeep($path)
380 380
     {
381
-        $this->filesystem->put($path . '/.gitkeep', '');
381
+        $this->filesystem->put($path.'/.gitkeep', '');
382 382
     }
383 383
 
384 384
     /**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     public function generateFiles()
388 388
     {
389 389
         foreach ($this->getFiles() as $stub => $file) {
390
-            $path = $this->module->getModulePath($this->getFolderName()) . $file;
390
+            $path = $this->module->getModulePath($this->getFolderName()).$file;
391 391
 
392 392
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
393 393
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 
415 415
         if (GenerateConfigReader::read('provider')->generate() === true) {
416 416
             $this->console->call('module:make-provider', [
417
-                'name' => $this->getName() . 'ServiceProvider',
417
+                'name' => $this->getName().'ServiceProvider',
418 418
                 'module' => $this->getName(),
419 419
                 '--master' => true,
420 420
             ]);
@@ -424,11 +424,11 @@  discard block
 block discarded – undo
424 424
         }
425 425
 
426 426
         if (GenerateConfigReader::read('controller')->generate() === true) {
427
-            $options = $this->type=='api'?['--api'=>true]:[];
427
+            $options = $this->type == 'api' ? ['--api'=>true] : [];
428 428
             $this->console->call('module:make-controller', [
429
-                    'controller' => $this->getName() . 'Controller',
429
+                    'controller' => $this->getName().'Controller',
430 430
                     'module' => $this->getName(),
431
-                ]+$options);
431
+                ] + $options);
432 432
         }
433 433
     }
434 434
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     protected function getStubContents($stub)
443 443
     {
444 444
         return (new Stub(
445
-            '/' . $stub . '.stub',
445
+            '/'.$stub.'.stub',
446 446
             $this->getReplacement($stub)
447 447
         )
448 448
         )->render();
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
             }
482 482
         }
483 483
         foreach ($keys as $key) {
484
-            if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) {
484
+            if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) {
485 485
                 $replaces[$key] = $this->$method();
486 486
             } else {
487 487
                 $replaces[$key] = null;
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
      */
497 497
     private function generateModuleJsonFile()
498 498
     {
499
-        $path = $this->module->getModulePath($this->getFolderName()) . 'module.json';
499
+        $path = $this->module->getModulePath($this->getFolderName()).'module.json';
500 500
 
501 501
         if (!$this->filesystem->isDirectory($dir = dirname($path))) {
502 502
             $this->filesystem->makeDirectory($dir, 0775, true);
@@ -513,13 +513,13 @@  discard block
 block discarded – undo
513 513
      */
514 514
     private function cleanModuleJsonFile()
515 515
     {
516
-        $path = $this->module->getModulePath($this->getFolderName()) . 'module.json';
516
+        $path = $this->module->getModulePath($this->getFolderName()).'module.json';
517 517
 
518 518
         $content = $this->filesystem->get($path);
519 519
         $namespace = $this->getModuleNamespaceReplacement();
520 520
         $studlyName = $this->getStudlyNameReplacement();
521 521
 
522
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
522
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
523 523
 
524 524
         $content = str_replace($provider, '', $content);
525 525
 
Please login to merge, or discard this patch.