Completed
Push — master ( 6424ee...f103eb )
by Nicolas
18s queued 11s
created
src/Generators/ModuleGenerator.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                 continue;
332 332
             }
333 333
 
334
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath();
334
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath();
335 335
 
336 336
             $this->filesystem->makeDirectory($path, 0755, true);
337 337
             if (config('modules.stubs.gitkeep')) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function generateGitKeep($path)
349 349
     {
350
-        $this->filesystem->put($path . '/.gitkeep', '');
350
+        $this->filesystem->put($path.'/.gitkeep', '');
351 351
     }
352 352
 
353 353
     /**
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     public function generateFiles()
357 357
     {
358 358
         foreach ($this->getFiles() as $stub => $file) {
359
-            $path = $this->module->getModulePath($this->getName()) . $file;
359
+            $path = $this->module->getModulePath($this->getName()).$file;
360 360
 
361 361
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
362 362
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 
384 384
         if (GenerateConfigReader::read('provider')->generate() === true) {
385 385
             $this->console->call('module:make-provider', [
386
-                'name' => $this->getName() . 'ServiceProvider',
386
+                'name' => $this->getName().'ServiceProvider',
387 387
                 'module' => $this->getName(),
388 388
                 '--master' => true,
389 389
             ]);
@@ -393,11 +393,11 @@  discard block
 block discarded – undo
393 393
         }
394 394
 
395 395
         if (GenerateConfigReader::read('controller')->generate() === true) {
396
-            $options = $this->type=='api'?['--api'=>true]:[];
396
+            $options = $this->type == 'api' ? ['--api'=>true] : [];
397 397
             $this->console->call('module:make-controller', [
398
-                'controller' => $this->getName() . 'Controller',
398
+                'controller' => $this->getName().'Controller',
399 399
                 'module' => $this->getName(),
400
-            ]+$options);
400
+            ] + $options);
401 401
         }
402 402
     }
403 403
 
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
     protected function getStubContents($stub)
412 412
     {
413 413
         return (new Stub(
414
-            '/' . $stub . '.stub',
414
+            '/'.$stub.'.stub',
415 415
             $this->getReplacement($stub)
416 416
         )
417 417
         )->render();
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
             }
451 451
         }
452 452
         foreach ($keys as $key) {
453
-            if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) {
453
+            if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) {
454 454
                 $replaces[$key] = $this->$method();
455 455
             } else {
456 456
                 $replaces[$key] = null;
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     private function generateModuleJsonFile()
467 467
     {
468
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
468
+        $path = $this->module->getModulePath($this->getName()).'module.json';
469 469
 
470 470
         if (!$this->filesystem->isDirectory($dir = dirname($path))) {
471 471
             $this->filesystem->makeDirectory($dir, 0775, true);
@@ -482,13 +482,13 @@  discard block
 block discarded – undo
482 482
      */
483 483
     private function cleanModuleJsonFile()
484 484
     {
485
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
485
+        $path = $this->module->getModulePath($this->getName()).'module.json';
486 486
 
487 487
         $content = $this->filesystem->get($path);
488 488
         $namespace = $this->getModuleNamespaceReplacement();
489 489
         $studlyName = $this->getStudlyNameReplacement();
490 490
 
491
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
491
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
492 492
 
493 493
         $content = str_replace($provider, '', $content);
494 494
 
Please login to merge, or discard this patch.
src/Commands/ModuleMakeCommand.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@
 block discarded – undo
75 75
         ];
76 76
     }
77 77
 
78
-     /**
79
-     * Get module type .
80
-     *
81
-     * @return string
82
-     */
78
+        /**
79
+         * Get module type .
80
+         *
81
+         * @return string
82
+         */
83 83
     private function getModuleType(){
84 84
 
85 85
         $isPlain = $this->option('plain');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,21 +80,21 @@
 block discarded – undo
80 80
      *
81 81
      * @return string
82 82
      */
83
-    private function getModuleType(){
83
+    private function getModuleType() {
84 84
 
85 85
         $isPlain = $this->option('plain');
86 86
         $isApi = $this->option('api');
87 87
 
88
-        if( $isPlain && $isApi ){
88
+        if ($isPlain && $isApi) {
89 89
             return 'web';
90 90
         }
91
-        if( $isPlain ){
91
+        if ($isPlain) {
92 92
             return 'plain';
93 93
         }
94
-        elseif( $isApi ){
94
+        elseif ($isApi) {
95 95
             return 'api';
96 96
         }
97
-        else{
97
+        else {
98 98
             return 'web';
99 99
         }
100 100
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,11 +90,9 @@
 block discarded – undo
90 90
         }
91 91
         if( $isPlain ){
92 92
             return 'plain';
93
-        }
94
-        elseif( $isApi ){
93
+        } elseif( $isApi ){
95 94
             return 'api';
96
-        }
97
-        else{
95
+        } else{
98 96
             return 'web';
99 97
         }
100 98
     }
Please login to merge, or discard this patch.