Passed
Branch main (999baf)
by Salah
12:12
created
src/Commands/EnableCommand.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         $this->components->info('Enabling domain ...');
32 32
 
33
-        if ($name = $this->argument('domain') ) {
33
+        if ($name = $this->argument('domain')) {
34 34
             $this->enable($name);
35 35
 
36 36
             return 0;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         if ($name instanceof Domain) {
68 68
             $domain = $name;
69
-        }else {
69
+        } else {
70 70
             $domain = $this->laravel['domains']->findOrFail($name);
71 71
         }
72 72
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $domain->enable();
75 75
 
76 76
             $this->components->info("Domain [{$domain}] enabled successful.");
77
-        }else {
77
+        } else {
78 78
             $this->components->warn("Domain [{$domain}] has already enabled.");
79 79
         }
80 80
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         if ($name instanceof Domain) {
68 68
             $domain = $name;
69
-        }else {
69
+        } else {
70 70
             $domain = $this->laravel['domains']->findOrFail($name);
71 71
         }
72 72
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $domain->enable();
75 75
 
76 76
             $this->components->info("Domain [{$domain}] enabled successful.");
77
-        }else {
77
+        } else {
78 78
             $this->components->warn("Domain [{$domain}] has already enabled.");
79 79
         }
80 80
 
Please login to merge, or discard this patch.
src/Commands/SeedCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         $name = $domain->getName();
105 105
         $config = $domain->get('migration');
106 106
         if (is_array($config) && array_key_exists('seeds', $config)) {
107
-            foreach ((array)$config['seeds'] as $class) {
107
+            foreach ((array) $config['seeds'] as $class) {
108 108
                 if (class_exists($class)) {
109 109
                     $seeders[] = $class;
110 110
                 }
Please login to merge, or discard this patch.
src/Commands/EntityCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @see fire()
42 42
      * @return void
43 43
      */
44
-    public function handle(){
44
+    public function handle() {
45 45
         $this->laravel->call([$this, 'fire'], func_get_args());
46 46
     }
47 47
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             ];
89 89
 
90 90
             // Generate a controller resource
91
-            $controller_command = ((float) app()->version() >= 5.5  ? 'make:rest-controller' : 'make:resource');
91
+            $controller_command = ((float) app()->version() >= 5.5 ? 'make:rest-controller' : 'make:resource');
92 92
             $this->call($controller_command, $resource_args);
93 93
         }
94 94
 
Please login to merge, or discard this patch.
src/Commands/RepositoryCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @see fire()
58 58
      * @return void
59 59
      */
60
-    public function handle(){
60
+    public function handle() {
61 61
         $this->laravel->call([$this, 'fire'], func_get_args());
62 62
     }
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function fire()
70 70
     {
71 71
         $this->generators = new Collection();
72
-        if($this->argument('domain') && $this->argument('domain-path')) {
72
+        if ($this->argument('domain') && $this->argument('domain-path')) {
73 73
             $domain = $this->argument('domain');
74 74
             $domainPath = $this->argument('domain-path');
75 75
         } else {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             'name'   => 'create_' . Str::snake(Str::plural($this->argument('name'))) . '_table',
82 82
             'fields' => $this->option('fillable'),
83 83
             'force'  => $this->option('force'),
84
-        ],$domain,$domainPath);
84
+        ], $domain, $domainPath);
85 85
 
86 86
         if (!$this->option('skip-migration')) {
87 87
             $this->generators->push($migrationGenerator);
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
             'name'     => $this->argument('name'),
92 92
             'fillable' => $this->option('fillable'),
93 93
             'force'    => $this->option('force')
94
-        ],$domain,$domainPath);
94
+        ], $domain, $domainPath);
95 95
 
96 96
         $modelRelationsGenerator = new ModelRelationsGenerator([
97 97
             'name' => $this->argument('name'),
98 98
             'force' => $this->option('force'),
99
-        ],$domain,$domainPath);
99
+        ], $domain, $domainPath);
100 100
 
101 101
         if (!$this->option('skip-model')) {
102 102
             $this->generators->push($modelGenerator);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $this->generators->push(new RepositoryInterfaceGenerator([
107 107
             'name'  => $this->argument('name'),
108 108
             'force' => $this->option('force'),
109
-        ],$domain,$domainPath));
109
+        ], $domain, $domainPath));
110 110
 
111 111
         foreach ($this->generators as $generator) {
112 112
             $generator->run();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 'validator' => $this->option('validator'),
126 126
                 'force'     => $this->option('force'),
127 127
                 'model'     => $model
128
-            ],$domain,$domainPath))->run();
128
+            ], $domain, $domainPath))->run();
129 129
             $this->info("Repository created successfully.");
130 130
         } catch (FileAlreadyExistsException $e) {
131 131
             $this->error($this->type . ' already exists!');
Please login to merge, or discard this patch.
src/Commands/EventMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     public function getDestinationFilePath()
42 42
     {
43
-        $path       = $this->laravel['domains']->getDomainPath($this->getDomainName());
43
+        $path = $this->laravel['domains']->getDomainPath($this->getDomainName());
44 44
 
45 45
         $eventPath = GenerateConfigReader::read('event');
46 46
 
Please login to merge, or discard this patch.
src/Commands/ListCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function handle(): int
29 29
     {
30 30
         $this->components->twoColumnDetail('<fg=gray>Status / Name</>', '<fg=gray>Path / priority</>');
31
-        collect($this->getRows())->each(function ($row) {
31
+        collect($this->getRows())->each(function($row) {
32 32
 
33 33
             $this->components->twoColumnDetail("[{$row[1]}] {$row[0]}", "{$row[3]} [{$row[2]}]");
34 34
         });
Please login to merge, or discard this patch.
src/Commands/GeneratorCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $contents = $this->getTemplateContents();
44 44
 
45 45
             try {
46
-                $this->components->task("Generating file {$path}",function () use ($path,$contents) {
46
+                $this->components->task("Generating file {$path}", function() use ($path, $contents) {
47 47
                     $overwriteFile = $this->hasOption('force') ? $this->option('force') : false;
48 48
                     (new FileGenerator($path, $contents))->withFileOverwrite($overwriteFile)->generate();
49 49
                 });
Please login to merge, or discard this patch.
src/Commands/ModelMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
         $string = '';
62 62
         foreach ($pieces as $i => $piece) {
63
-            if ($i+1 < count($pieces)) {
63
+            if ($i + 1 < count($pieces)) {
64 64
                 $string .= strtolower($piece) . '_';
65 65
             } else {
66 66
                 $string .= Str::plural(strtolower($piece));
Please login to merge, or discard this patch.
src/Commands/DomainMakeCommand.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@
 block discarded – undo
77 77
     }
78 78
 
79 79
     /**
80
-    * Get domain type .
81
-    *
82
-    * @return string
83
-    */
80
+     * Get domain type .
81
+     *
82
+     * @return string
83
+     */
84 84
     private function getDomainType()
85 85
     {
86 86
         $isPlain = $this->option('plain');
Please login to merge, or discard this patch.