@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | { |
| 204 | 204 | $lowerName = $this->getLowerName(); |
| 205 | 205 | |
| 206 | - $langPath = $this->getPath() . '/Resources/lang'; |
|
| 206 | + $langPath = $this->getPath().'/Resources/lang'; |
|
| 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 | /** |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function getCachedServicesPath(): string |
| 17 | 17 | { |
| 18 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath()); |
|
| 18 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath()); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function getCachedServicesPath(): string |
| 14 | 14 | { |
| 15 | - return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->basePath('storage/app/') . 'services.php'); |
|
| 15 | + return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->basePath('storage/app/').'services.php'); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $paths = array_merge($paths, $this->config('scan.paths')); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - $paths = array_map(function ($path) { |
|
| 119 | + $paths = array_map(function($path) { |
|
| 120 | 120 | return Str::endsWith($path, '/*') ? $path : Str::finish($path, '/*'); |
| 121 | 121 | }, $paths); |
| 122 | 122 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function getCached() |
| 202 | 202 | { |
| 203 | - return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
| 203 | + return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
| 204 | 204 | return $this->toCollection()->toArray(); |
| 205 | 205 | }); |
| 206 | 206 | } |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | { |
| 290 | 290 | $modules = $this->allEnabled(); |
| 291 | 291 | |
| 292 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
| 292 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
| 293 | 293 | if ($a->get('order') === $b->get('order')) { |
| 294 | 294 | return 0; |
| 295 | 295 | } |
@@ -428,9 +428,9 @@ discard block |
||
| 428 | 428 | public function getModulePath($module) |
| 429 | 429 | { |
| 430 | 430 | try { |
| 431 | - return $this->findOrFail($module)->getPath() . '/'; |
|
| 431 | + return $this->findOrFail($module)->getPath().'/'; |
|
| 432 | 432 | } catch (ModuleNotFoundException $e) { |
| 433 | - return $this->getPath() . '/' . Str::studly($module) . '/'; |
|
| 433 | + return $this->getPath().'/'.Str::studly($module).'/'; |
|
| 434 | 434 | } |
| 435 | 435 | } |
| 436 | 436 | |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | */ |
| 444 | 444 | public function assetPath($module) : string |
| 445 | 445 | { |
| 446 | - return $this->config('paths.assets') . '/' . $module; |
|
| 446 | + return $this->config('paths.assets').'/'.$module; |
|
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | /** |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | */ |
| 452 | 452 | public function config(string $key, $default = null) |
| 453 | 453 | { |
| 454 | - return $this->config->get('modules.' . $key, $default); |
|
| 454 | + return $this->config->get('modules.'.$key, $default); |
|
| 455 | 455 | } |
| 456 | 456 | |
| 457 | 457 | /** |
@@ -541,9 +541,9 @@ discard block |
||
| 541 | 541 | } |
| 542 | 542 | list($name, $url) = explode(':', $asset); |
| 543 | 543 | |
| 544 | - $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
| 544 | + $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
| 545 | 545 | |
| 546 | - $url = $this->url->asset($baseUrl . "/{$name}/" . $url); |
|
| 546 | + $url = $this->url->asset($baseUrl."/{$name}/".$url); |
|
| 547 | 547 | |
| 548 | 548 | return str_replace(['http://', 'https://'], '//', $url); |
| 549 | 549 | } |