@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | 'stubs' => [ |
| 26 | 26 | 'enabled' => false, |
| 27 | - 'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs', |
|
| 27 | + 'path' => base_path().'/vendor/nwidart/laravel-modules/src/Commands/stubs', |
|
| 28 | 28 | 'files' => [ |
| 29 | 29 | 'start' => 'start.php', |
| 30 | 30 | 'routes' => 'Http/routes.php', |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | foreach (array_reverse($this->laravel['modules']->all()) as $module) { |
| 45 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
| 45 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
| 46 | 46 | |
| 47 | 47 | $this->reset($module); |
| 48 | 48 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | foreach (array_reverse($this->laravel['modules']->all()) as $module) { |
| 45 | - $this->line('Running for module: <info>' . $module->getName() . '</info>'); |
|
| 45 | + $this->line('Running for module: <info>'.$module->getName().'</info>'); |
|
| 46 | 46 | |
| 47 | 47 | $this->reset($module); |
| 48 | 48 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $seederPath = $this->laravel['modules']->config('paths.generator.filter'); |
| 74 | 74 | |
| 75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; |
|
| 75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $seederPath = $this->laravel['modules']->config('paths.generator.filter'); |
| 74 | 74 | |
| 75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; |
|
| 75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | $controllerPath = $this->laravel['modules']->config('paths.generator.controller'); |
| 45 | 45 | |
| 46 | - return $path . $controllerPath . '/' . $this->getControllerName() . '.php'; |
|
| 46 | + return $path.$controllerPath.'/'.$this->getControllerName().'.php'; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function getPath() |
| 90 | 90 | { |
| 91 | - return static::getBasePath() . $this->path; |
|
| 91 | + return static::getBasePath().$this->path; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $contents = file_get_contents($this->getPath()); |
| 122 | 122 | |
| 123 | 123 | foreach ($this->replaces as $search => $replace) { |
| 124 | - $contents = str_replace('$' . strtoupper($search) . '$', $replace, $contents); |
|
| 124 | + $contents = str_replace('$'.strtoupper($search).'$', $replace, $contents); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | return $contents; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public function saveTo($path, $filename) |
| 149 | 149 | { |
| 150 | - return file_put_contents($path . '/' . $filename, $this->getContents()); |
|
| 150 | + return file_put_contents($path.'/'.$filename, $this->getContents()); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | |
| 66 | 66 | $jobPath = $this->laravel['modules']->config('paths.generator.jobs'); |
| 67 | 67 | |
| 68 | - return $path . $jobPath . '/' . $this->getFileName() . '.php'; |
|
| 68 | + return $path.$jobPath.'/'.$this->getFileName().'.php'; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function createField($column, $attributes, $type = 'add') |
| 145 | 145 | { |
| 146 | - $results = "\t\t\t" . '$table'; |
|
| 146 | + $results = "\t\t\t".'$table'; |
|
| 147 | 147 | |
| 148 | 148 | foreach ($attributes as $key => $field) { |
| 149 | 149 | if (in_array($column, $this->relationshipKeys)) { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - return $results .= ';' . PHP_EOL; |
|
| 156 | + return $results .= ';'.PHP_EOL; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | protected function addRelationColumn($key, $field, $column) |
| 169 | 169 | { |
| 170 | - $relatedColumn = snake_case(class_basename($field)) . '_id'; |
|
| 170 | + $relatedColumn = snake_case(class_basename($field)).'_id'; |
|
| 171 | 171 | |
| 172 | 172 | $method = 'integer'; |
| 173 | 173 | |
@@ -186,18 +186,18 @@ discard block |
||
| 186 | 186 | protected function addColumn($key, $field, $column) |
| 187 | 187 | { |
| 188 | 188 | if ($this->hasCustomAttribute($column)) { |
| 189 | - return '->' . $field; |
|
| 189 | + return '->'.$field; |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | if ($key == 0) { |
| 193 | - return '->' . $field . "('" . $column . "')"; |
|
| 193 | + return '->'.$field."('".$column."')"; |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | if (str_contains($field, '(')) { |
| 197 | - return '->' . $field; |
|
| 197 | + return '->'.$field; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - return '->' . $field . '()'; |
|
| 200 | + return '->'.$field.'()'; |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
@@ -212,10 +212,10 @@ discard block |
||
| 212 | 212 | protected function removeColumn($key, $field, $column) |
| 213 | 213 | { |
| 214 | 214 | if ($this->hasCustomAttribute($column)) { |
| 215 | - return '->' . $field; |
|
| 215 | + return '->'.$field; |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | - return '->dropColumn(' . "'" . $column . "')"; |
|
| 218 | + return '->dropColumn('."'".$column."')"; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public function getAttributes($column, $schema) |
| 242 | 242 | { |
| 243 | - $fields = str_replace($column . ':', '', $schema); |
|
| 243 | + $fields = str_replace($column.':', '', $schema); |
|
| 244 | 244 | |
| 245 | 245 | return $this->hasCustomAttribute($column) ? $this->getCustomAttribute($column) : explode(':', $fields); |
| 246 | 246 | } |