@@ -144,7 +144,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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', [ |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function getCachedServicesPath() |
16 | 16 | { |
17 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
17 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function getCachedServicesPath() |
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 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | protected function registerNamespaces() |
45 | 45 | { |
46 | - $configPath = __DIR__ . '/../config/config.php'; |
|
46 | + $configPath = __DIR__.'/../config/config.php'; |
|
47 | 47 | |
48 | 48 | $this->mergeConfigFrom($configPath, 'modules'); |
49 | 49 | $this->publishes([ |
@@ -59,7 +59,7 @@ discard block |
||
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 |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getDestinationFilePath() |
79 | 79 | { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | |
101 | 101 | $commandPath = GenerateConfigReader::read('command'); |
102 | 102 | |
103 | - return $path . $commandPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
103 | + return $path.$commandPath->getPath().'/'.$this->getFileName().'.php'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -59,7 +59,7 @@ discard block |
||
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 |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getDestinationFilePath() |
79 | 79 | { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $factoryPath = GenerateConfigReader::read('factory'); |
65 | 65 | |
66 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
66 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | */ |
72 | 72 | private function getFileName() |
73 | 73 | { |
74 | - return Str::studly($this->argument('name')) . '.php'; |
|
74 | + return Str::studly($this->argument('name')).'.php'; |
|
75 | 75 | } |
76 | 76 | } |
@@ -59,7 +59,7 @@ discard block |
||
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 |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getDestinationFilePath() |
79 | 79 | { |
@@ -78,7 +78,7 @@ |
||
78 | 78 | |
79 | 79 | $middlewarePath = GenerateConfigReader::read('filter'); |
80 | 80 | |
81 | - return $path . $middlewarePath->getPath() . '/' . $this->getFileName() . '.php'; |
|
81 | + return $path.$middlewarePath->getPath().'/'.$this->getFileName().'.php'; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -59,7 +59,7 @@ discard block |
||
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 |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return mixed |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getDestinationFilePath() |
79 | 79 | { |
@@ -76,7 +76,7 @@ |
||
76 | 76 | |
77 | 77 | $policyPath = GenerateConfigReader::read('policies'); |
78 | 78 | |
79 | - return $path . $policyPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
79 | + return $path.$policyPath->getPath().'/'.$this->getFileName().'.php'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |