@@ -33,12 +33,12 @@ |
||
| 33 | 33 | ? '<fg=red;options=bold>Disabled</>' |
| 34 | 34 | : '<fg=green;options=bold>Enabled</>'; |
| 35 | 35 | |
| 36 | - $this->components->task("Disabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function () use ($module) { |
|
| 36 | + $this->components->task("Disabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function() use ($module) { |
|
| 37 | 37 | $module->disable(); |
| 38 | 38 | }); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - function getInfo(): string|null |
|
| 41 | + function getInfo(): string | null |
|
| 42 | 42 | { |
| 43 | 43 | return 'Disabling module ...'; |
| 44 | 44 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function handle(): int |
| 29 | 29 | { |
| 30 | 30 | $this->components->twoColumnDetail('<fg=gray>Status / Name</>', '<fg=gray>Path / priority</>'); |
| 31 | - collect($this->getRows())->each(function ($row) { |
|
| 31 | + collect($this->getRows())->each(function($row) { |
|
| 32 | 32 | |
| 33 | 33 | $this->components->twoColumnDetail("[{$row[1]}] {$row[0]}", "{$row[3]} [{$row[2]}]"); |
| 34 | 34 | }); |
@@ -22,14 +22,14 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $module = $this->getModuleModel($name); |
| 24 | 24 | |
| 25 | - $this->components->task("Generating for <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
| 25 | + $this->components->task("Generating for <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
| 26 | 26 | chdir($module->getPath()); |
| 27 | 27 | |
| 28 | 28 | passthru('composer dump -o -n -q'); |
| 29 | 29 | }); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - function getInfo(): string|null |
|
| 32 | + function getInfo(): string | null |
|
| 33 | 33 | { |
| 34 | 34 | return 'Generating optimized autoload modules'; |
| 35 | 35 | } |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $module = $this->getModuleModel($name); |
| 28 | 28 | |
| 29 | - $this->components->task("Running Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
| 29 | + $this->components->task("Running Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
| 30 | 30 | $path = str_replace(base_path(), '', (new Migrator($module, $this->getLaravel()))->getPath()); |
| 31 | 31 | |
| 32 | 32 | if ($this->option('subpath')) { |
| 33 | - $path = $path . "/" . $this->option("subpath"); |
|
| 33 | + $path = $path."/".$this->option("subpath"); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | $this->call('migrate', [ |
@@ -38,15 +38,13 @@ |
||
| 38 | 38 | $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
| 39 | 39 | try { |
| 40 | 40 | $this->moduleSeed($module); |
| 41 | - } |
|
| 42 | - catch (\Error $e) { |
|
| 41 | + } catch (\Error $e) { |
|
| 43 | 42 | $e = new ErrorException($e->getMessage(), $e->getCode(), 1, $e->getFile(), $e->getLine(), $e); |
| 44 | 43 | $this->reportException($e); |
| 45 | 44 | $this->renderException($this->getOutput(), $e); |
| 46 | 45 | |
| 47 | 46 | return FALSE; |
| 48 | - } |
|
| 49 | - catch (\Exception $e) { |
|
| 47 | + } catch (\Exception $e) { |
|
| 50 | 48 | $this->reportException($e); |
| 51 | 49 | $this->renderException($this->getOutput(), $e); |
| 52 | 50 | |
@@ -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; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $module = $this->getModuleModel($name); |
| 27 | 27 | |
| 28 | - $this->components->task("Refreshing Migration {$module->getName()} module", function () use ($module) { |
|
| 28 | + $this->components->task("Refreshing Migration {$module->getName()} module", function() use ($module) { |
|
| 29 | 29 | $this->call('module:migrate-reset', [ |
| 30 | 30 | 'module' => $module->getStudlyName(), |
| 31 | 31 | '--database' => $this->option('database'), |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | ]); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - public function getInfo(): string|null |
|
| 41 | + public function getInfo(): string | null |
|
| 42 | 42 | { |
| 43 | 43 | return NULL; |
| 44 | 44 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $database = $this->option('database'); |
| 34 | 34 | |
| 35 | - if (! empty($database)) { |
|
| 35 | + if (!empty($database)) { |
|
| 36 | 36 | $migrator->setDatabase($database); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $this->components->warn("Nothing to rollback on module <fg=cyan;options=bold>{$module->getName()}</>"); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - public function getInfo(): string|null |
|
| 52 | + public function getInfo(): string | null |
|
| 53 | 53 | { |
| 54 | 54 | return NULL; |
| 55 | 55 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $database = $this->option('database'); |
| 34 | 34 | |
| 35 | - if (! empty($database)) { |
|
| 35 | + if (!empty($database)) { |
|
| 36 | 36 | $migrator->setDatabase($database); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - public function getInfo(): string|null |
|
| 53 | + public function getInfo(): string | null |
|
| 54 | 54 | { |
| 55 | 55 | return NULL; |
| 56 | 56 | } |