@@ -88,7 +88,7 @@ |
||
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 | { |
@@ -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 | /** |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | - * @param $name |
|
68 | + * @param string $name |
|
69 | 69 | * |
70 | 70 | * @throws RuntimeException |
71 | 71 | * |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $name = $module->getName(); |
104 | 104 | $config = $module->get('migration'); |
105 | 105 | if (is_array($config) && array_key_exists('seeds', $config)) { |
106 | - foreach ((array)$config['seeds'] as $class) { |
|
106 | + foreach ((array) $config['seeds'] as $class) { |
|
107 | 107 | if (class_exists($class)) { |
108 | 108 | $seeders[] = $class; |
109 | 109 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | protected function dbSeed($className) |
138 | 138 | { |
139 | 139 | if ($option = $this->option('class')) { |
140 | - $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option; |
|
140 | + $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option; |
|
141 | 141 | } else { |
142 | 142 | $params = ['--class' => $className]; |
143 | 143 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $config = GenerateConfigReader::read('seeder'); |
169 | 169 | $seederPath = str_replace('/', '\\', $config->getPath()); |
170 | 170 | |
171 | - return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder'; |
|
171 | + return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder'; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $foundModules = []; |
189 | 189 | foreach ($this->laravel['modules']->config('scan.paths') as $path) { |
190 | 190 | $namespace = array_slice(explode('/', $path), -1)[0]; |
191 | - $foundModules[] = $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder'; |
|
191 | + $foundModules[] = $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder'; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | return $foundModules; |
@@ -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 | { |
@@ -86,7 +86,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -90,7 +90,7 @@ |
||
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 | { |
@@ -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 | } |
@@ -123,14 +123,14 @@ |
||
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 | } |