Completed
Pull Request — master (#1380)
by Felipe
06:23
created
src/Commands/UpdateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
     protected function updateModule($name)
47 47
     {
48
-        $this->line('Running for module: <info>' . $name . '</info>');
48
+        $this->line('Running for module: <info>'.$name.'</info>');
49 49
 
50 50
         $this->laravel['modules']->update($name);
51 51
 
Please login to merge, or discard this patch.
src/Commands/ProviderMakeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         /** @var Module $module */
76 76
         $module = $this->laravel['modules']->findOrFail($this->getModuleName());
77 77
 
78
-        return (new Stub('/' . $stub . '.stub', [
78
+        return (new Stub('/'.$stub.'.stub', [
79 79
             'NAMESPACE'         => $this->getClassNamespace($module),
80 80
             'CLASS'             => $this->getClass(),
81 81
             'LOWER_NAME'        => $module->getLowerName(),
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         $generatorPath = GenerateConfigReader::read('provider');
102 102
 
103
-        return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php';
103
+        return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php';
104 104
     }
105 105
 
106 106
     /**
Please login to merge, or discard this patch.
src/Commands/TestMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             $testPath = GenerateConfigReader::read('test');
81 81
         }
82 82
 
83
-        return $path . $testPath->getPath() . '/' . $this->getFileName() . '.php';
83
+        return $path.$testPath->getPath().'/'.$this->getFileName().'.php';
84 84
     }
85 85
 
86 86
     /**
Please login to merge, or discard this patch.
src/Commands/MigrateCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         }
48 48
 
49 49
         foreach ($this->module->getOrdered($this->option('direction')) as $module) {
50
-            $this->line('Running for module: <info>' . $module->getName() . '</info>');
50
+            $this->line('Running for module: <info>'.$module->getName().'</info>');
51 51
 
52 52
             $this->migrate($module);
53 53
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $path = str_replace(base_path(), '', (new Migrator($module, $this->getLaravel()))->getPath());
64 64
 
65 65
         if ($this->option('subpath')) {
66
-            $path = $path . "/" . $this->option("subpath");
66
+            $path = $path."/".$this->option("subpath");
67 67
         }
68 68
 
69 69
         $this->call('migrate', [
Please login to merge, or discard this patch.
src/LumenModulesServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function setupStubPath()
33 33
     {
34
-        Stub::setBasePath(__DIR__ . '/Commands/stubs');
34
+        Stub::setBasePath(__DIR__.'/Commands/stubs');
35 35
 
36 36
         if (app('modules')->config('stubs.enabled') === true) {
37 37
             Stub::setBasePath(app('modules')->config('stubs.path'));
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
      */
44 44
     protected function registerServices()
45 45
     {
46
-        $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) {
46
+        $this->app->singleton(Contracts\RepositoryInterface::class, function($app) {
47 47
             $path = $app['config']->get('modules.paths.modules');
48 48
 
49 49
             return new Lumen\LumenFileRepository($app, $path);
50 50
         });
51
-        $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) {
51
+        $this->app->singleton(Contracts\ActivatorInterface::class, function($app) {
52 52
             $activator = $app['config']->get('modules.activator');
53
-            $class = $app['config']->get('modules.activators.' . $activator)['class'];
53
+            $class = $app['config']->get('modules.activators.'.$activator)['class'];
54 54
 
55 55
             return new $class($app);
56 56
         });
Please login to merge, or discard this patch.
src/Activators/FileActivator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             return $this->readJson();
80 80
         }
81 81
 
82
-        return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function () {
82
+        return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function() {
83 83
             return $this->readJson();
84 84
         });
85 85
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     private function config(string $key, $default = null)
103 103
     {
104
-        return $this->config->get('modules.activators.file.' . $key, $default);
104
+        return $this->config->get('modules.activators.file.'.$key, $default);
105 105
     }
106 106
 
107 107
     /**
Please login to merge, or discard this patch.
src/Lumen/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function getCachedServicesPath(): string
14 14
     {
15
-        return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->basePath('storage/app/') . 'services.php');
15
+        return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->basePath('storage/app/').'services.php');
16 16
     }
17 17
 
18 18
     /**
Please login to merge, or discard this patch.
src/Support/Migrations/SchemaParser.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function createField($column, $attributes, $type = 'add')
148 148
     {
149
-        $results = "\t\t\t" . '$table';
149
+        $results = "\t\t\t".'$table';
150 150
 
151 151
         foreach ($attributes as $key => $field) {
152 152
             if (in_array($column, $this->relationshipKeys)) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             }
157 157
         }
158 158
 
159
-        return $results . ';' . PHP_EOL;
159
+        return $results.';'.PHP_EOL;
160 160
     }
161 161
 
162 162
     /**
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
     protected function addRelationColumn($key, $field, $column)
172 172
     {
173 173
         if ($key === 0) {
174
-            $relatedColumn = Str::snake(class_basename($field)) . '_id';
174
+            $relatedColumn = Str::snake(class_basename($field)).'_id';
175 175
 
176
-            return "->integer('{$relatedColumn}')->unsigned();" . PHP_EOL . "\t\t\t" . "\$table->foreign('{$relatedColumn}')";
176
+            return "->integer('{$relatedColumn}')->unsigned();".PHP_EOL."\t\t\t"."\$table->foreign('{$relatedColumn}')";
177 177
         }
178 178
         if ($key === 1) {
179 179
             return "->references('{$field}')";
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
             return "->on('{$field}')";
183 183
         }
184 184
         if (Str::contains($field, '(')) {
185
-            return '->' . $field;
185
+            return '->'.$field;
186 186
         }
187
-        return '->' . $field . '()';
187
+        return '->'.$field.'()';
188 188
     }
189 189
 
190 190
     /**
@@ -199,18 +199,18 @@  discard block
 block discarded – undo
199 199
     protected function addColumn($key, $field, $column)
200 200
     {
201 201
         if ($this->hasCustomAttribute($column)) {
202
-            return '->' . $field;
202
+            return '->'.$field;
203 203
         }
204 204
 
205 205
         if ($key == 0) {
206
-            return '->' . $field . "('" . $column . "')";
206
+            return '->'.$field."('".$column."')";
207 207
         }
208 208
 
209 209
         if (Str::contains($field, '(')) {
210
-            return '->' . $field;
210
+            return '->'.$field;
211 211
         }
212 212
 
213
-        return '->' . $field . '()';
213
+        return '->'.$field.'()';
214 214
     }
215 215
 
216 216
     /**
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
     protected function removeColumn($key, $field, $column)
226 226
     {
227 227
         if ($this->hasCustomAttribute($column)) {
228
-            return '->' . $field;
228
+            return '->'.$field;
229 229
         }
230 230
 
231
-        return '->dropColumn(' . "'" . $column . "')";
231
+        return '->dropColumn('."'".$column."')";
232 232
     }
233 233
 
234 234
     /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      */
254 254
     public function getAttributes($column, $schema)
255 255
     {
256
-        $fields = str_replace($column . ':', '', $schema);
256
+        $fields = str_replace($column.':', '', $schema);
257 257
 
258 258
         return $this->hasCustomAttribute($column) ? $this->getCustomAttribute($column) : explode(':', $fields);
259 259
     }
Please login to merge, or discard this patch.
src/Commands/SeedCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $name = $module->getName();
104 104
         $config = $module->get('migration');
105 105
         if (is_array($config) && array_key_exists('seeds', $config)) {
106
-            foreach ((array)$config['seeds'] as $class) {
106
+            foreach ((array) $config['seeds'] as $class) {
107 107
                 if (class_exists($class)) {
108 108
                     $seeders[] = $class;
109 109
                 }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     protected function dbSeed($className)
138 138
     {
139 139
         if ($option = $this->option('class')) {
140
-            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option;
140
+            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option;
141 141
         } else {
142 142
             $params = ['--class' => $className];
143 143
         }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $config = GenerateConfigReader::read('seeder');
169 169
         $seederPath = str_replace('/', '\\', $config->getPath());
170 170
 
171
-        return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
171
+        return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
172 172
     }
173 173
 
174 174
     /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $foundModules = [];
189 189
         foreach ($this->laravel['modules']->config('scan.paths') as $path) {
190 190
             $namespace = array_slice(explode('/', $path), -1)[0];
191
-            $foundModules[] = $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
191
+            $foundModules[] = $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
192 192
         }
193 193
 
194 194
         return $foundModules;
Please login to merge, or discard this patch.