@@ -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; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function registerNamespaces() |
38 | 38 | { |
39 | - $configPath = __DIR__ . '/../config/config.php'; |
|
39 | + $configPath = __DIR__.'/../config/config.php'; |
|
40 | 40 | |
41 | 41 | $this->mergeConfigFrom($configPath, 'modules'); |
42 | 42 | $this->publishes([ |
@@ -73,6 +73,6 @@ discard block |
||
73 | 73 | */ |
74 | 74 | protected function registerMigrations() |
75 | 75 | { |
76 | - $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|
76 | + $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
77 | 77 | } |
78 | 78 | } |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function setupStubPath() |
39 | 39 | { |
40 | - Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
40 | + Stub::setBasePath(__DIR__.'/Commands/stubs'); |
|
41 | 41 | |
42 | - $this->app->booted(function ($app) { |
|
42 | + $this->app->booted(function($app) { |
|
43 | 43 | /** @var RepositoryInterface $moduleRepository */ |
44 | 44 | $moduleRepository = $app[RepositoryInterface::class]; |
45 | 45 | if ($moduleRepository->config('stubs.enabled') === true) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function registerServices() |
55 | 55 | { |
56 | - $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) { |
|
56 | + $this->app->singleton(Contracts\RepositoryInterface::class, function($app) { |
|
57 | 57 | $path = $app['config']->get('modules.paths.modules'); |
58 | 58 | |
59 | 59 | if ($app['config']->get('modules.activator') === 'database') { |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | |
63 | 63 | return new Laravel\LaravelFileRepository($app, $path); |
64 | 64 | }); |
65 | - $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) { |
|
65 | + $this->app->singleton(Contracts\ActivatorInterface::class, function($app) { |
|
66 | 66 | $activator = $app['config']->get('modules.activator'); |
67 | - $class = $app['config']->get('modules.activators.' . $activator)['class']; |
|
67 | + $class = $app['config']->get('modules.activators.'.$activator)['class']; |
|
68 | 68 | |
69 | 69 | return new $class($app); |
70 | 70 | }); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function getCached() |
98 | 98 | { |
99 | - return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
99 | + return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
100 | 100 | return $this->toCollection()->toArray(); |
101 | 101 | }); |
102 | 102 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function getModulePath($name) |
280 | 280 | { |
281 | - return $this->getPath() . '/' . $name; |
|
281 | + return $this->getPath().'/'.$name; |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | */ |
300 | 300 | public function config(string $key, $default = null) |
301 | 301 | { |
302 | - return $this->config->get('modules.' . $key, $default); |
|
302 | + return $this->config->get('modules.'.$key, $default); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | */ |
358 | 358 | public function assetPath(string $module): string |
359 | 359 | { |
360 | - return $this->config('paths.assets') . '/' . $module; |
|
360 | + return $this->config('paths.assets').'/'.$module; |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | /** |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | $lowerName = $this->getLowerName(); |
205 | 205 | |
206 | - $langPath = $this->getPath() . config('modules.paths.generator.lang.namespace', config('modules.paths.generator.lang.path')); |
|
206 | + $langPath = $this->getPath().config('modules.paths.generator.lang.namespace', config('modules.paths.generator.lang.path')); |
|
207 | 207 | |
208 | 208 | if (is_dir($langPath)) { |
209 | 209 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | $file = 'module.json'; |
224 | 224 | } |
225 | 225 | |
226 | - return Arr::get($this->moduleJson, $file, function () use ($file) { |
|
227 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->files); |
|
226 | + return Arr::get($this->moduleJson, $file, function() use ($file) { |
|
227 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->files); |
|
228 | 228 | }); |
229 | 229 | } |
230 | 230 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | */ |
278 | 278 | protected function fireEvent($event): void |
279 | 279 | { |
280 | - $this->app['events']->dispatch(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
280 | + $this->app['events']->dispatch(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
281 | 281 | } |
282 | 282 | /** |
283 | 283 | * Register the aliases from this module. |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | protected function registerFiles(): void |
303 | 303 | { |
304 | 304 | foreach ($this->get('files', []) as $file) { |
305 | - include $this->path . '/' . $file; |
|
305 | + include $this->path.'/'.$file; |
|
306 | 306 | } |
307 | 307 | } |
308 | 308 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function getExtraPath(string $path) : string |
409 | 409 | { |
410 | - return $this->getPath() . '/' . $path; |
|
410 | + return $this->getPath().'/'.$path; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | /** |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create(config('modules.activators.database.table'), function (Blueprint $table) { |
|
16 | + Schema::create(config('modules.activators.database.table'), function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->string('alias')->nullable(); |