@@ -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 | } |
@@ -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 | } catch (\Error $e) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | }); |
54 | 54 | } |
55 | 55 | |
56 | - public function getInfo(): string|null |
|
56 | + public function getInfo(): string | null |
|
57 | 57 | { |
58 | 58 | return 'Seeding module ...'; |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $config = $module->get('migration'); |
102 | 102 | |
103 | 103 | if (is_array($config) && array_key_exists('seeds', $config)) { |
104 | - foreach ((array)$config['seeds'] as $class) { |
|
104 | + foreach ((array) $config['seeds'] as $class) { |
|
105 | 105 | if (class_exists($class)) { |
106 | 106 | $seeders[] = $class; |
107 | 107 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | protected function dbSeed($className) |
139 | 139 | { |
140 | 140 | if ($option = $this->option('class')) { |
141 | - $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option; |
|
141 | + $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option; |
|
142 | 142 | } else { |
143 | 143 | $params = ['--class' => $className]; |
144 | 144 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $config = GenerateConfigReader::read('seeder'); |
170 | 170 | $seederPath = str_replace('/', '\\', $config->getPath()); |
171 | 171 | |
172 | - return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder'; |
|
172 | + return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder'; |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $foundModules = []; |
190 | 190 | foreach ($this->laravel['modules']->config('scan.paths') as $path) { |
191 | 191 | $namespace = array_slice(explode('/', $path), -1)[0]; |
192 | - $foundModules[] = $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder'; |
|
192 | + $foundModules[] = $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder'; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | return $foundModules; |
@@ -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 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $path = str_replace('/', '\\', $path); |
74 | 74 | |
75 | - return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $path; |
|
75 | + return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$path; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function getModelVariable(): string |
90 | 90 | { |
91 | - return '$' . Str::lower($this->argument('name')); |
|
91 | + return '$'.Str::lower($this->argument('name')); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $observerPath = GenerateConfigReader::read('observer'); |
102 | 102 | |
103 | - return $path . $observerPath->getPath() . '/' . $this->getFileName(); |
|
103 | + return $path.$observerPath->getPath().'/'.$this->getFileName(); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | private function getFileName() |
110 | 110 | { |
111 | - return Str::studly($this->argument('name')) . 'Observer.php'; |
|
111 | + return Str::studly($this->argument('name')).'Observer.php'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | public function handle(): int |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $string = ''; |
59 | 59 | foreach ($pieces as $i => $piece) { |
60 | 60 | if ($i + 1 < count($pieces)) { |
61 | - $string .= strtolower($piece) . '_'; |
|
61 | + $string .= strtolower($piece).'_'; |
|
62 | 62 | } else { |
63 | 63 | $string .= Str::plural(strtolower($piece)); |
64 | 64 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | private function handleOptionalMigrationOption() |
100 | 100 | { |
101 | 101 | if ($this->option('migration') === true) { |
102 | - $migrationName = 'create_' . $this->createMigrationName() . '_table'; |
|
102 | + $migrationName = 'create_'.$this->createMigrationName().'_table'; |
|
103 | 103 | $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]); |
104 | 104 | } |
105 | 105 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | $modelPath = GenerateConfigReader::read('model'); |
134 | 134 | |
135 | - return $path . $modelPath->getPath() . '/' . $this->getModelName() . '.php'; |
|
135 | + return $path.$modelPath->getPath().'/'.$this->getModelName().'.php'; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $controllerPath = GenerateConfigReader::read('controller'); |
46 | 46 | |
47 | - return $path . $controllerPath->getPath() . '/' . $this->getControllerName() . '.php'; |
|
47 | + return $path.$controllerPath->getPath().'/'.$this->getControllerName().'.php'; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | $generatorPath = GenerateConfigReader::read('provider'); |
89 | 89 | |
90 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
90 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | protected function getWebRoutesPath() |
97 | 97 | { |
98 | - return '/' . $this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php'); |
|
98 | + return '/'.$this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php'); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function getApiRoutesPath() |
105 | 105 | { |
106 | - return '/' . $this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php'); |
|
106 | + return '/'.$this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php'); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | public function getDefaultNamespace(): string |
@@ -30,7 +30,7 @@ |
||
30 | 30 | ]); |
31 | 31 | } |
32 | 32 | |
33 | - public function getInfo(): string|null |
|
33 | + public function getInfo(): string | null |
|
34 | 34 | { |
35 | 35 | return 'Publishing module config files ...'; |
36 | 36 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | $module = $this->getModuleModel($name); |
28 | 28 | |
29 | - $this->components->task("Publishing Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) { |
|
29 | + $this->components->task("Publishing Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) { |
|
30 | 30 | with(new MigrationPublisher(new Migrator($module, $this->getLaravel()))) |
31 | 31 | ->setRepository($this->laravel['modules']) |
32 | 32 | ->setConsole($this) |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | }); |
35 | 35 | } |
36 | 36 | |
37 | - public function getInfo(): string|null |
|
37 | + public function getInfo(): string | null |
|
38 | 38 | { |
39 | 39 | return 'Publishing module migrations ...'; |
40 | 40 | } |