Completed
Pull Request — master (#697)
by
unknown
17:47
created
src/Publishing/Publisher.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     /**
89 89
      * Get module instance.
90 90
      *
91
-     * @return \Nwidart\Modules\Module
91
+     * @return string
92 92
      */
93 93
     public function getModule()
94 94
     {
Please login to merge, or discard this patch.
src/Traits/MigrationLoaderTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
      */
12 12
     protected function loadMigrationFiles($module)
13 13
     {
14
-        $path = $this->laravel['modules']->getModulePath($module) . $this->getMigrationGeneratorPath();
14
+        $path = $this->laravel['modules']->getModulePath($module).$this->getMigrationGeneratorPath();
15 15
 
16
-        $files = $this->laravel['files']->glob($path . '/*_*.php');
16
+        $files = $this->laravel['files']->glob($path.'/*_*.php');
17 17
 
18 18
         foreach ($files as $file) {
19 19
             $this->laravel['files']->requireOnce($file);
Please login to merge, or discard this patch.
src/Commands/SeedCommand.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     }
66 66
 
67 67
     /**
68
-     * @param $name
68
+     * @param string $name
69 69
      *
70 70
      * @throws RuntimeException
71 71
      *
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $name = $module->getName();
98 98
         $config = $module->get('migration');
99 99
         if (is_array($config) && array_key_exists('seeds', $config)) {
100
-            foreach ((array)$config['seeds'] as $class) {
100
+            foreach ((array) $config['seeds'] as $class) {
101 101
                 if (class_exists($class)) {
102 102
                     $seeders[] = $class;
103 103
                 }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     protected function dbSeed($className)
124 124
     {
125 125
         if ($option = $this->option('class')) {
126
-            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option;
126
+            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option;
127 127
         } else {
128 128
             $params = ['--class' => $className];
129 129
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $seederPath = GenerateConfigReader::read('seeder');
155 155
         $seederPath = str_replace('/', '\\', $seederPath->getPath());
156 156
 
157
-        return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
157
+        return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
158 158
     }
159 159
 
160 160
     /**
Please login to merge, or discard this patch.
src/Commands/SeedMakeCommand.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return mixed
62
+     * @return string
63 63
      */
64 64
     protected function getTemplateContents()
65 65
     {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-     * @return mixed
76
+     * @return string
77 77
      */
78 78
     protected function getDestinationFilePath()
79 79
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $seederPath = GenerateConfigReader::read('seeder');
88 88
 
89
-        return $path . $seederPath->getPath() . '/' . $this->getSeederName() . '.php';
89
+        return $path.$seederPath->getPath().'/'.$this->getSeederName().'.php';
90 90
     }
91 91
 
92 92
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $end = $this->option('master') ? 'DatabaseSeeder' : 'TableSeeder';
100 100
 
101
-        return Str::studly($this->argument('name')) . $end;
101
+        return Str::studly($this->argument('name')).$end;
102 102
     }
103 103
 
104 104
     /**
Please login to merge, or discard this patch.
src/Support/Migrations/NameParser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     /**
91 91
      * Get matches data from regex.
92 92
      *
93
-     * @return array
93
+     * @return string[]
94 94
      */
95 95
     public function getMatches()
96 96
     {
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/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.