Completed
Push — master ( 775af9...e8ba7e )
by
unknown
16:24 queued 05:47
created
src/Commands/Make/EventProviderMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
         $filePath = GenerateConfigReader::read('provider')->getPath();
25 25
 
26
-        return $path . $filePath . '/' . $this->getEventServiceProviderName() . '.php';
26
+        return $path.$filePath.'/'.$this->getEventServiceProviderName().'.php';
27 27
     }
28 28
 
29 29
     protected function getTemplateContents(): string
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
         ];
54 54
     }
55 55
 
56
-    protected function getEventServiceProviderName(): array|string
56
+    protected function getEventServiceProviderName(): array | string
57 57
     {
58 58
         return Str::studly('EventServiceProvider');
59 59
     }
60 60
 
61
-    private function getClassNameWithoutNamespace(): array|string
61
+    private function getClassNameWithoutNamespace(): array | string
62 62
     {
63 63
         return class_basename($this->getEventServiceProviderName());
64 64
     }
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
                 continue;
407 407
             }
408 408
 
409
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath();
409
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath();
410 410
 
411 411
             $this->filesystem->ensureDirectoryExists($path, 0755, true);
412 412
             if (config('modules.stubs.gitkeep')) {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
      */
423 423
     public function generateGitKeep($path)
424 424
     {
425
-        $this->filesystem->put($path . '/.gitkeep', '');
425
+        $this->filesystem->put($path.'/.gitkeep', '');
426 426
     }
427 427
 
428 428
     /**
@@ -431,9 +431,9 @@  discard block
 block discarded – undo
431 431
     public function generateFiles()
432 432
     {
433 433
         foreach ($this->getFiles() as $stub => $file) {
434
-            $path = $this->module->getModulePath($this->getName()) . $file;
434
+            $path = $this->module->getModulePath($this->getName()).$file;
435 435
 
436
-            $this->component->task("Generating file {$path}", function () use ($stub, $path) {
436
+            $this->component->task("Generating file {$path}", function() use ($stub, $path) {
437 437
                 if (!$this->filesystem->isDirectory($dir = dirname($path))) {
438 438
                     $this->filesystem->makeDirectory($dir, 0775, true);
439 439
                 }
@@ -459,14 +459,14 @@  discard block
 block discarded – undo
459 459
         $providerGenerator = GenerateConfigReader::read('provider');
460 460
         if ($providerGenerator->generate() === true) {
461 461
             $this->console->call('module:make-provider', [
462
-                'name' => $this->getName() . 'ServiceProvider',
462
+                'name' => $this->getName().'ServiceProvider',
463 463
                 'module' => $this->getName(),
464 464
                 '--master' => true,
465 465
             ]);
466 466
         } else {
467 467
             // delete register ServiceProvider on module.json
468
-            $path           = $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . 'module.json';
469
-            $module_file  =   $this->filesystem->get($path);
468
+            $path = $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.'module.json';
469
+            $module_file = $this->filesystem->get($path);
470 470
             $this->filesystem->put(
471 471
                 $path,
472 472
                 preg_replace('/"providers": \[.*?\],/s', '"providers": [ ],', $module_file)
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
                 $this->filesystem->replaceInFile(
488 488
                     '$this->app->register(Event',
489 489
                     '// $this->app->register(Event',
490
-                    $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . $providerGenerator->getPath() . DIRECTORY_SEPARATOR . sprintf('%sServiceProvider.php', $this->getName())
490
+                    $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.$providerGenerator->getPath().DIRECTORY_SEPARATOR.sprintf('%sServiceProvider.php', $this->getName())
491 491
                 );
492 492
             }
493 493
         }
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
                 $this->filesystem->replaceInFile(
507 507
                     '$this->app->register(Route',
508 508
                     '// $this->app->register(Route',
509
-                    $this->module->getModulePath($this->getName()) . DIRECTORY_SEPARATOR . $providerGenerator->getPath() . DIRECTORY_SEPARATOR . sprintf('%sServiceProvider.php', $this->getName())
509
+                    $this->module->getModulePath($this->getName()).DIRECTORY_SEPARATOR.$providerGenerator->getPath().DIRECTORY_SEPARATOR.sprintf('%sServiceProvider.php', $this->getName())
510 510
                 );
511 511
             }
512 512
         }
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
         if (GenerateConfigReader::read('controller')->generate() === true) {
515 515
             $options = $this->type == 'api' ? ['--api' => true] : [];
516 516
             $this->console->call('module:make-controller', [
517
-                'controller' => $this->getName() . 'Controller',
517
+                'controller' => $this->getName().'Controller',
518 518
                 'module' => $this->getName(),
519 519
             ] + $options);
520 520
         }
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
     protected function getStubContents($stub)
531 531
     {
532 532
         return (new Stub(
533
-            '/' . $stub . '.stub',
533
+            '/'.$stub.'.stub',
534 534
             $this->getReplacement($stub)
535 535
         )
536 536
         )->render();
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
             }
574 574
         }
575 575
         foreach ($keys as $key) {
576
-            if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) {
576
+            if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) {
577 577
                 $replaces[$key] = $this->$method();
578 578
             } else {
579 579
                 $replaces[$key] = null;
@@ -588,9 +588,9 @@  discard block
 block discarded – undo
588 588
      */
589 589
     private function generateModuleJsonFile()
590 590
     {
591
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
591
+        $path = $this->module->getModulePath($this->getName()).'module.json';
592 592
 
593
-        $this->component->task("Generating file $path", function () use ($path) {
593
+        $this->component->task("Generating file $path", function() use ($path) {
594 594
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
595 595
                 $this->filesystem->makeDirectory($dir, 0775, true);
596 596
             }
@@ -605,13 +605,13 @@  discard block
 block discarded – undo
605 605
      */
606 606
     private function cleanModuleJsonFile()
607 607
     {
608
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
608
+        $path = $this->module->getModulePath($this->getName()).'module.json';
609 609
 
610 610
         $content = $this->filesystem->get($path);
611 611
         $namespace = $this->getModuleNamespaceReplacement();
612 612
         $studlyName = $this->getStudlyNameReplacement();
613 613
 
614
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
614
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
615 615
 
616 616
         $content = str_replace($provider, '', $content);
617 617
 
Please login to merge, or discard this patch.