@@ -39,11 +39,11 @@ |
||
| 39 | 39 | |
| 40 | 40 | public function getDestinationFilePath() |
| 41 | 41 | { |
| 42 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
| 42 | + $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
| 43 | 43 | |
| 44 | 44 | $eventPath = GenerateConfigReader::read('event'); |
| 45 | 45 | |
| 46 | - return $path . $eventPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 46 | + return $path.$eventPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | $testPath = GenerateConfigReader::read('test-unit'); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return $path . $testPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 83 | + return $path.$testPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | { |
| 224 | 224 | $lowerName = $this->getLowerName(); |
| 225 | 225 | |
| 226 | - $langPath = $this->getPath() . '/Resources/lang'; |
|
| 226 | + $langPath = $this->getPath().'/Resources/lang'; |
|
| 227 | 227 | |
| 228 | 228 | if (is_dir($langPath)) { |
| 229 | 229 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -243,8 +243,8 @@ discard block |
||
| 243 | 243 | $file = 'module.json'; |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | - return Arr::get($this->moduleJson, $file, function () use ($file) { |
|
| 247 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->files); |
|
| 246 | + return Arr::get($this->moduleJson, $file, function() use ($file) { |
|
| 247 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->files); |
|
| 248 | 248 | }); |
| 249 | 249 | } |
| 250 | 250 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | */ |
| 298 | 298 | protected function fireEvent($event): void |
| 299 | 299 | { |
| 300 | - $this->app['events']->dispatch(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
| 300 | + $this->app['events']->dispatch(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | protected function registerFiles(): void |
| 324 | 324 | { |
| 325 | 325 | foreach ($this->get('files', []) as $file) { |
| 326 | - include $this->path . '/' . $file; |
|
| 326 | + include $this->path.'/'.$file; |
|
| 327 | 327 | } |
| 328 | 328 | } |
| 329 | 329 | |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | */ |
| 429 | 429 | public function getExtraPath(string $path): string |
| 430 | 430 | { |
| 431 | - return $this->getPath() . '/' . $path; |
|
| 431 | + return $this->getPath().'/'.$path; |
|
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | /** |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $module = $this->getModuleModel($name); |
| 37 | 37 | |
| 38 | - $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
| 38 | + $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
| 39 | 39 | try { |
| 40 | 40 | $this->moduleSeed($module); |
| 41 | 41 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | }); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - function getInfo(): string|null |
|
| 58 | + function getInfo(): string | null |
|
| 59 | 59 | { |
| 60 | 60 | return 'Seeding module ...'; |
| 61 | 61 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $config = $module->get('migration'); |
| 104 | 104 | |
| 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 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | protected function dbSeed($className) |
| 141 | 141 | { |
| 142 | 142 | if ($option = $this->option('class')) { |
| 143 | - $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option; |
|
| 143 | + $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option; |
|
| 144 | 144 | } else { |
| 145 | 145 | $params = ['--class' => $className]; |
| 146 | 146 | } |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $config = GenerateConfigReader::read('seeder'); |
| 172 | 172 | $seederPath = str_replace('/', '\\', $config->getPath()); |
| 173 | 173 | |
| 174 | - return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder'; |
|
| 174 | + return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder'; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | $foundModules = []; |
| 192 | 192 | foreach ($this->laravel['modules']->config('scan.paths') as $path) { |
| 193 | 193 | $namespace = array_slice(explode('/', $path), -1)[0]; |
| 194 | - $foundModules[] = $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder'; |
|
| 194 | + $foundModules[] = $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder'; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | return $foundModules; |