Completed
Push — master ( 418450...8d1efe )
by
unknown
07:19 queued 30s
created
src/Commands/MigrateResetCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $database = $this->option('database');
34 34
 
35
-        if (! empty($database)) {
35
+        if (!empty($database)) {
36 36
             $migrator->setDatabase($database);
37 37
         }
38 38
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->components->warn("Nothing to rollback on module <fg=cyan;options=bold>{$module->getName()}</>");
50 50
     }
51 51
 
52
-    public function getInfo(): string|null
52
+    public function getInfo(): string | null
53 53
     {
54 54
         return NULL;
55 55
     }
Please login to merge, or discard this patch.
src/Commands/MigrateRollbackCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $database = $this->option('database');
34 34
 
35
-        if (! empty($database)) {
35
+        if (!empty($database)) {
36 36
             $migrator->setDatabase($database);
37 37
         }
38 38
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     }
52 52
 
53
-    public function getInfo(): string|null
53
+    public function getInfo(): string | null
54 54
     {
55 55
         return NULL;
56 56
     }
Please login to merge, or discard this patch.
src/Commands/MigrateStatusCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         ]);
39 39
     }
40 40
 
41
-    public function getInfo(): string|null
41
+    public function getInfo(): string | null
42 42
     {
43 43
         return NULL;
44 44
     }
Please login to merge, or discard this patch.
src/Commands/DisableCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
             ? '<fg=red;options=bold>Disabled</>'
34 34
             : '<fg=green;options=bold>Enabled</>';
35 35
 
36
-        $this->components->task("Disabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function () use ($module) {
36
+        $this->components->task("Disabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function() use ($module) {
37 37
             $module->disable();
38 38
         });
39 39
     }
40 40
 
41
-    function getInfo(): string|null
41
+    function getInfo(): string | null
42 42
     {
43 43
         return 'Disabling module ...';
44 44
     }
Please login to merge, or discard this patch.
src/Commands/DumpCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
     {
23 23
         $module = $this->getModuleModel($name);
24 24
 
25
-        $this->components->task("Generating for <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
25
+        $this->components->task("Generating for <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
26 26
             chdir($module->getPath());
27 27
 
28 28
             passthru('composer dump -o -n -q');
29 29
         });
30 30
     }
31 31
 
32
-    function getInfo(): string|null
32
+    function getInfo(): string | null
33 33
     {
34 34
         return 'Generating optimized autoload modules';
35 35
     }
Please login to merge, or discard this patch.
src/Commands/EnableCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
             ? '<fg=red;options=bold>Disabled</>'
27 27
             : '<fg=green;options=bold>Enabled</>';
28 28
 
29
-        $this->components->task("Enabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function () use ($module) {
29
+        $this->components->task("Enabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function() use ($module) {
30 30
             $module->enable();
31 31
         });
32 32
     }
33 33
 
34
-    function getInfo(): string|null
34
+    function getInfo(): string | null
35 35
     {
36 36
         return 'Disabling module ...';
37 37
     }
Please login to merge, or discard this patch.
src/Commands/CheckLangCommand.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         parent::__construct();
29 29
 
30
-        $this->langPath = DIRECTORY_SEPARATOR . config('modules.paths.generator.lang.path', 'Resources/lang');
30
+        $this->langPath = DIRECTORY_SEPARATOR.config('modules.paths.generator.lang.path', 'Resources/lang');
31 31
     }
32 32
 
33 33
     public function executeAction($name): void
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $directories = $this->getDirectories($module);
38 38
 
39
-        if (! $directories) {
39
+        if (!$directories) {
40 40
             return;
41 41
         }
42 42
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     }
48 48
 
49
-    function getInfo(): string|null
49
+    function getInfo(): string | null
50 50
     {
51 51
         return 'Checking languages ...';
52 52
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     private function getLangFiles($module)
55 55
     {
56 56
         $files = [];
57
-        $path  = $module->getPath() . $this->langPath;
57
+        $path  = $module->getPath().$this->langPath;
58 58
         if (is_dir($path)) {
59 59
             $files = array_merge($files, $this->laravel['files']->all($path));
60 60
         }
@@ -65,17 +65,17 @@  discard block
 block discarded – undo
65 65
     private function getDirectories($module)
66 66
     {
67 67
         $moduleName = $module->getStudlyName();
68
-        $path       = $module->getPath() . '/Resources/lang';
68
+        $path       = $module->getPath().'/Resources/lang';
69 69
         if (is_dir($path)) {
70 70
             $directories = $this->laravel['files']->directories($path);
71
-            $directories = array_map(function ($directory) use ($moduleName) {
71
+            $directories = array_map(function($directory) use ($moduleName) {
72 72
                 return [
73 73
                     'name'   => basename($directory),
74 74
                     'module' => $moduleName,
75 75
                     'path'   => $directory,
76
-                    'files'  => array_map(function ($file) {
76
+                    'files'  => array_map(function($file) {
77 77
                         return basename($file);
78
-                    }, \File::glob($directory . DIRECTORY_SEPARATOR . "*")),
78
+                    }, \File::glob($directory.DIRECTORY_SEPARATOR."*")),
79 79
                 ];
80 80
             }, $directories);
81 81
         }
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
 
101 101
         $uniqeLangFiles = $directories->pluck('files')->flatten()->unique()->values();
102 102
 
103
-        $directories->each(function ($directory) use ($uniqeLangFiles, &$missingFilesMessage) {
103
+        $directories->each(function($directory) use ($uniqeLangFiles, &$missingFilesMessage) {
104 104
 
105 105
             $missingFiles = $uniqeLangFiles->diff($directory['files']);
106 106
 
107 107
             if ($missingFiles->count() > 0) {
108
-                $missingFiles->each(function ($missingFile) use ($directory, &$missingFilesMessage) {
108
+                $missingFiles->each(function($missingFile) use ($directory, &$missingFilesMessage) {
109 109
                     $missingFilesMessage[$directory['name']][] = " {$directory['module']} - Missing language file: {$directory['name']}/{$missingFile}";
110 110
                 });
111 111
             }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         if (count($missingFilesMessage) > 0) {
116 116
 
117
-            collect($missingFilesMessage)->each(function ($messages, $langDirectory) {
117
+            collect($missingFilesMessage)->each(function($messages, $langDirectory) {
118 118
 
119 119
                 $this->components->error("Missing language files in $langDirectory directory");
120 120
 
@@ -138,22 +138,22 @@  discard block
 block discarded – undo
138 138
 
139 139
 
140 140
         $missingKeysMessage = [];
141
-        $directories->each(function ($directory) use ($uniqeLangFiles, $langDirectories, &$missingKeysMessage) {
141
+        $directories->each(function($directory) use ($uniqeLangFiles, $langDirectories, &$missingKeysMessage) {
142 142
 
143
-            $uniqeLangFiles->each(function ($file) use ($directory, $langDirectories, &$missingKeysMessage) {
144
-                $langKeys = $this->getLangKeys($directory['path'] . DIRECTORY_SEPARATOR . $file);
143
+            $uniqeLangFiles->each(function($file) use ($directory, $langDirectories, &$missingKeysMessage) {
144
+                $langKeys = $this->getLangKeys($directory['path'].DIRECTORY_SEPARATOR.$file);
145 145
 
146 146
                 if ($langKeys == FALSE) {
147 147
                     return;
148 148
                 }
149 149
 
150
-                $langDirectories->each(function ($langDirectory) use ($directory, $file, $langKeys, &$missingKeysMessage) {
150
+                $langDirectories->each(function($langDirectory) use ($directory, $file, $langKeys, &$missingKeysMessage) {
151 151
 
152 152
                     if ($directory['name'] != $langDirectory) {
153 153
 
154 154
                         $basePath = str_replace($directory['name'], $langDirectory, $directory['path']);
155 155
 
156
-                        $otherLangKeys = $this->getLangKeys($basePath . DIRECTORY_SEPARATOR . $file);
156
+                        $otherLangKeys = $this->getLangKeys($basePath.DIRECTORY_SEPARATOR.$file);
157 157
 
158 158
                         if ($otherLangKeys == FALSE) {
159 159
                             return;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                         $missingKeys = $langKeys->diff($otherLangKeys);
163 163
                         if ($missingKeys->count() > 0) {
164 164
 
165
-                            $missingKeys->each(function ($missingKey) use ($directory, $langDirectory, $file, &$missingKeysMessage) {
165
+                            $missingKeys->each(function($missingKey) use ($directory, $langDirectory, $file, &$missingKeysMessage) {
166 166
                                 $missingKeysMessage[$langDirectory][] = " {$directory['module']} - Missing language key: {$langDirectory}/{$file} | key: $missingKey";
167 167
                             });
168 168
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         if (count($missingKeysMessage) > 0) {
177 177
 
178
-            collect($missingKeysMessage)->each(function ($messages, $langDirectory) {
178
+            collect($missingKeysMessage)->each(function($messages, $langDirectory) {
179 179
 
180 180
                 $this->components->error("Missing language keys for directory $langDirectory:");
181 181
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,8 +193,7 @@
 block discarded – undo
193 193
         if (\File::exists($file)) {
194 194
             $lang = \File::getRequire($file);
195 195
             return collect(\Arr::dot($lang))->keys();
196
-        }
197
-        else {
196
+        } else {
198 197
             return FALSE;
199 198
         }
200 199
     }
Please login to merge, or discard this patch.
src/Commands/SeedCommand.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $module = $this->getModuleModel($name);
37 37
 
38
-        $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
38
+        $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
39 39
             try {
40 40
                 $this->moduleSeed($module);
41 41
             }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         });
56 56
     }
57 57
 
58
-    function getInfo(): string|null
58
+    function getInfo(): string | null
59 59
     {
60 60
         return 'Seeding module ...';
61 61
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $name = $module->getName();
103 103
         $config = $module->get('migration');
104 104
         if (is_array($config) && array_key_exists('seeds', $config)) {
105
-            foreach ((array)$config['seeds'] as $class) {
105
+            foreach ((array) $config['seeds'] as $class) {
106 106
                 if (class_exists($class)) {
107 107
                     $seeders[] = $class;
108 108
                 }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     protected function dbSeed($className)
137 137
     {
138 138
         if ($option = $this->option('class')) {
139
-            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option;
139
+            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option;
140 140
         } else {
141 141
             $params = ['--class' => $className];
142 142
         }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $config = GenerateConfigReader::read('seeder');
168 168
         $seederPath = str_replace('/', '\\', $config->getPath());
169 169
 
170
-        return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
170
+        return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
171 171
     }
172 172
 
173 173
     /**
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $foundModules = [];
188 188
         foreach ($this->laravel['modules']->config('scan.paths') as $path) {
189 189
             $namespace = array_slice(explode('/', $path), -1)[0];
190
-            $foundModules[] = $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
190
+            $foundModules[] = $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
191 191
         }
192 192
 
193 193
         return $foundModules;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,15 +38,13 @@
 block discarded – undo
38 38
         $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
39 39
             try {
40 40
                 $this->moduleSeed($module);
41
-            }
42
-            catch (\Error $e) {
41
+            } catch (\Error $e) {
43 42
                 $e = new ErrorException($e->getMessage(), $e->getCode(), 1, $e->getFile(), $e->getLine(), $e);
44 43
                 $this->reportException($e);
45 44
                 $this->renderException($this->getOutput(), $e);
46 45
 
47 46
                 return FALSE;
48
-            }
49
-            catch (\Exception $e) {
47
+            } catch (\Exception $e) {
50 48
                 $this->reportException($e);
51 49
                 $this->renderException($this->getOutput(), $e);
52 50
 
Please login to merge, or discard this patch.
src/Commands/MigrateRefreshCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $module = $this->getModuleModel($name);
27 27
 
28
-        $this->components->task("Refreshing Migration {$module->getName()} module", function () use ($module) {
28
+        $this->components->task("Refreshing Migration {$module->getName()} module", function() use ($module) {
29 29
             $this->call('module:migrate-reset', [
30 30
                 'module'     => $module->getStudlyName(),
31 31
                 '--database' => $this->option('database'),
Please login to merge, or discard this patch.