@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function toArray() |
26 | 26 | { |
27 | - return array_map(function ($value) { |
|
27 | + return array_map(function($value) { |
|
28 | 28 | if ($value instanceof Module) { |
29 | 29 | return $value->json()->getAttributes(); |
30 | 30 | } |
@@ -11,9 +11,9 @@ |
||
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); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $process->setTimeout($this->timeout); |
136 | 136 | |
137 | 137 | if ($this->console instanceof Command) { |
138 | - $process->run(function ($type, $line) { |
|
138 | + $process->run(function($type, $line) { |
|
139 | 139 | $this->console->line($line); |
140 | 140 | }); |
141 | 141 | } |
@@ -239,10 +239,10 @@ discard block |
||
239 | 239 | public function getPackageName() |
240 | 240 | { |
241 | 241 | if (is_null($this->version)) { |
242 | - return $this->name . ':dev-master'; |
|
242 | + return $this->name.':dev-master'; |
|
243 | 243 | } |
244 | 244 | |
245 | - return $this->name . ':' . $this->version; |
|
245 | + return $this->name.':'.$this->version; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
@@ -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', |
@@ -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 | /** |
@@ -83,7 +83,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -49,7 +49,7 @@ |
||
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 | } |
@@ -49,7 +49,7 @@ |
||
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 | } |
@@ -86,11 +86,11 @@ |
||
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 | } |