Completed
Push — master ( 3fb137...7a8b50 )
by Nicolas
02:45
created
src/Migrations/Migrator.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getMigrations($reverse = false)
85 85
     {
86
-        $files = $this->laravel['files']->glob($this->getPath() . '/*_*.php');
86
+        $files = $this->laravel['files']->glob($this->getPath().'/*_*.php');
87 87
 
88 88
         // Once we have the array of files in the directory we will just remove the
89 89
         // extension and take the basename of the file which is all we need when
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             return array();
93 93
         }
94 94
 
95
-        $files = array_map(function ($file) {
95
+        $files = array_map(function($file) {
96 96
             return str_replace('.php', '', basename($file));
97 97
 
98 98
         }, $files);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $path = $this->getPath();
212 212
         foreach ($files as $file) {
213
-            $this->laravel['files']->requireOnce($path . '/' . $file . '.php');
213
+            $this->laravel['files']->requireOnce($path.'/'.$file.'.php');
214 214
         }
215 215
     }
216 216
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
         $result = $query->orderBy('migration', 'desc')->get();
291 291
 
292
-        return collect($result)->map(function ($item) {
292
+        return collect($result)->map(function($item) {
293 293
             return (array) $item;
294 294
         })->pluck('migration');
295 295
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@
 block discarded – undo
242 242
      *
243 243
      * @param string $migration
244 244
      *
245
-     * @return mixed
245
+     * @return boolean
246 246
      */
247 247
     public function log($migration)
248 248
     {
Please login to merge, or discard this patch.
src/Commands/MigrateRollbackCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         }
50 50
 
51 51
         foreach ($this->module->getOrdered($this->option('direction')) as $module) {
52
-            $this->line('Running for module: <info>' . $module->getName() . '</info>');
52
+            $this->line('Running for module: <info>'.$module->getName().'</info>');
53 53
 
54 54
             $this->rollback($module);
55 55
         }
Please login to merge, or discard this patch.
src/Commands/MigrateResetCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         }
50 50
 
51 51
         foreach ($this->module->getOrdered($this->option('direction')) as $module) {
52
-            $this->line('Running for module: <info>' . $module->getName() . '</info>');
52
+            $this->line('Running for module: <info>'.$module->getName().'</info>');
53 53
 
54 54
             $this->reset($module);
55 55
         }
Please login to merge, or discard this patch.
src/Commands/GeneratorCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@
 block discarded – undo
86 86
 
87 87
         $namespace = $this->laravel['modules']->config('namespace');
88 88
 
89
-        $namespace .= '\\' . $module->getStudlyName();
89
+        $namespace .= '\\'.$module->getStudlyName();
90 90
 
91
-        $namespace .= '\\' . $this->getDefaultNamespace();
91
+        $namespace .= '\\'.$this->getDefaultNamespace();
92 92
 
93
-        $namespace .= '\\' . $extra;
93
+        $namespace .= '\\'.$extra;
94 94
 
95 95
         return trim($namespace, '\\');
96 96
     }
Please login to merge, or discard this patch.
src/Json.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,14 +123,14 @@
 block discarded – undo
123 123
 
124 124
         // any JSON parsing errors should throw an exception
125 125
         if (json_last_error() > 0) {
126
-            throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg());
126
+            throw new InvalidJsonException('Error processing file: '.$this->getPath().'. Error: '.json_last_error_msg());
127 127
         }
128 128
 
129 129
         if (config('modules.cache.enabled') === false) {
130 130
             return $attributes;
131 131
         }
132 132
 
133
-        return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () use ($attributes) {
133
+        return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function() use ($attributes) {
134 134
             return $attributes;
135 135
         });
136 136
     }
Please login to merge, or discard this patch.
src/Support/Migrations/SchemaParser.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function createField($column, $attributes, $type = 'add')
146 146
     {
147
-        $results = "\t\t\t" . '$table';
147
+        $results = "\t\t\t".'$table';
148 148
 
149 149
         foreach ($attributes as $key => $field) {
150 150
             if (in_array($column, $this->relationshipKeys)) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             }
155 155
         }
156 156
 
157
-        return $results . ';' . PHP_EOL;
157
+        return $results.';'.PHP_EOL;
158 158
     }
159 159
 
160 160
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     protected function addRelationColumn($key, $field, $column)
170 170
     {
171
-        $relatedColumn = snake_case(class_basename($field)) . '_id';
171
+        $relatedColumn = snake_case(class_basename($field)).'_id';
172 172
 
173 173
         $method = 'integer';
174 174
 
@@ -187,18 +187,18 @@  discard block
 block discarded – undo
187 187
     protected function addColumn($key, $field, $column)
188 188
     {
189 189
         if ($this->hasCustomAttribute($column)) {
190
-            return '->' . $field;
190
+            return '->'.$field;
191 191
         }
192 192
 
193 193
         if ($key == 0) {
194
-            return '->' . $field . "('" . $column . "')";
194
+            return '->'.$field."('".$column."')";
195 195
         }
196 196
 
197 197
         if (str_contains($field, '(')) {
198
-            return '->' . $field;
198
+            return '->'.$field;
199 199
         }
200 200
 
201
-        return '->' . $field . '()';
201
+        return '->'.$field.'()';
202 202
     }
203 203
 
204 204
     /**
@@ -213,10 +213,10 @@  discard block
 block discarded – undo
213 213
     protected function removeColumn($key, $field, $column)
214 214
     {
215 215
         if ($this->hasCustomAttribute($column)) {
216
-            return '->' . $field;
216
+            return '->'.$field;
217 217
         }
218 218
 
219
-        return '->dropColumn(' . "'" . $column . "')";
219
+        return '->dropColumn('."'".$column."')";
220 220
     }
221 221
 
222 222
     /**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function getAttributes($column, $schema)
243 243
     {
244
-        $fields = str_replace($column . ':', '', $schema);
244
+        $fields = str_replace($column.':', '', $schema);
245 245
 
246 246
         return $this->hasCustomAttribute($column) ? $this->getCustomAttribute($column) : explode(':', $fields);
247 247
     }
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))->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/Module.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @param Container $app
46 46
      * @param $name
47
-     * @param $path
47
+     * @param string $path
48 48
      */
49 49
     public function __construct(Container $app, $name, $path)
50 50
     {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     /**
189 189
      * Get json contents from the cache, setting as needed.
190 190
      *
191
-     * @param $file
191
+     * @param string $file
192 192
      *
193 193
      * @return Json
194 194
      */
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     /**
220 220
      * Get a specific data from composer.json file by given the key.
221 221
      *
222
-     * @param $key
222
+     * @param string $key
223 223
      * @param null $default
224 224
      *
225 225
      * @return mixed
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     /**
298 298
      * Determine whether the given status same with the current module status.
299 299
      *
300
-     * @param $status
300
+     * @param integer $status
301 301
      *
302 302
      * @return bool
303 303
      */
@@ -349,9 +349,9 @@  discard block
 block discarded – undo
349 349
     /**
350 350
      * Set active state for current module.
351 351
      *
352
-     * @param $active
352
+     * @param integer $active
353 353
      *
354
-     * @return bool
354
+     * @return integer
355 355
      */
356 356
     public function setActive($active)
357 357
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $lowerName = $this->getLowerName();
188 188
 
189
-        $langPath = $this->getPath() . "/Resources/lang";
189
+        $langPath = $this->getPath()."/Resources/lang";
190 190
 
191 191
         if (is_dir($langPath)) {
192 192
             $this->loadTranslationsFrom($langPath, $lowerName);
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
             $file = 'module.json';
207 207
         }
208 208
 
209
-        return array_get($this->moduleJson, $file, function () use ($file) {
210
-            return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']);
209
+        return array_get($this->moduleJson, $file, function() use ($file) {
210
+            return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']);
211 211
         });
212 212
     }
213 213
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     protected function fireEvent($event)
260 260
     {
261
-        $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]);
261
+        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
262 262
     }
263 263
     /**
264 264
      * Register the aliases from this module.
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     protected function registerFiles()
284 284
     {
285 285
         foreach ($this->get('files', []) as $file) {
286
-            include $this->path . '/' . $file;
286
+            include $this->path.'/'.$file;
287 287
         }
288 288
     }
289 289
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public function getExtraPath($path)
406 406
     {
407
-        return $this->getPath() . '/' . $path;
407
+        return $this->getPath().'/'.$path;
408 408
     }
409 409
 
410 410
     /**
Please login to merge, or discard this patch.
src/Laravel/Repository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $modules = [];
40 40
 
41 41
         foreach ($cached as $name => $module) {
42
-            $path = $this->config('paths.modules') . '/' . $name;
42
+            $path = $this->config('paths.modules').'/'.$name;
43 43
 
44 44
             $modules[$name] = new Module($this->app, $name, $path);
45 45
         }
Please login to merge, or discard this patch.