@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | return $this->readJson(); |
184 | 184 | } |
185 | 185 | |
186 | - return $this->cache->store($this->config->get('modules.cache.driver'))->remember($this->cacheKey, $this->cacheLifetime, function () { |
|
186 | + return $this->cache->store($this->config->get('modules.cache.driver'))->remember($this->cacheKey, $this->cacheLifetime, function() { |
|
187 | 187 | return $this->readJson(); |
188 | 188 | }); |
189 | 189 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | private function config(string $key, $default = null) |
199 | 199 | { |
200 | - return $this->config->get('modules.activators.file.' . $key, $default); |
|
200 | + return $this->config->get('modules.activators.file.'.$key, $default); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
@@ -123,14 +123,14 @@ |
||
123 | 123 | |
124 | 124 | // any JSON parsing errors should throw an exception |
125 | 125 | if (json_last_error() > 0) { |
126 | - throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg()); |
|
126 | + throw new InvalidJsonException('Error processing file: '.$this->getPath().'. Error: '.json_last_error_msg()); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | if (config('modules.cache.enabled') === false) { |
130 | 130 | return $attributes; |
131 | 131 | } |
132 | 132 | |
133 | - return app('cache')->store(config('modules.cache.driver'))->remember($this->getPath(), config('modules.cache.lifetime'), function () use ($attributes) { |
|
133 | + return app('cache')->store(config('modules.cache.driver'))->remember($this->getPath(), config('modules.cache.lifetime'), function() use ($attributes) { |
|
134 | 134 | return $attributes; |
135 | 135 | }); |
136 | 136 | } |
@@ -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->store($this->config->get('modules.cache.driver'))->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
203 | + return $this->cache->store($this->config->get('modules.cache.driver'))->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('priority') === $b->get('priority')) { |
294 | 294 | return 0; |
295 | 295 | } |
@@ -418,9 +418,9 @@ discard block |
||
418 | 418 | public function getModulePath($module) |
419 | 419 | { |
420 | 420 | try { |
421 | - return $this->findOrFail($module)->getPath() . '/'; |
|
421 | + return $this->findOrFail($module)->getPath().'/'; |
|
422 | 422 | } catch (ModuleNotFoundException $e) { |
423 | - return $this->getPath() . '/' . Str::studly($module) . '/'; |
|
423 | + return $this->getPath().'/'.Str::studly($module).'/'; |
|
424 | 424 | } |
425 | 425 | } |
426 | 426 | |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | */ |
430 | 430 | public function assetPath(string $module): string |
431 | 431 | { |
432 | - return $this->config('paths.assets') . '/' . $module; |
|
432 | + return $this->config('paths.assets').'/'.$module; |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | /** |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | */ |
438 | 438 | public function config(string $key, $default = null) |
439 | 439 | { |
440 | - return $this->config->get('modules.' . $key, $default); |
|
440 | + return $this->config->get('modules.'.$key, $default); |
|
441 | 441 | } |
442 | 442 | |
443 | 443 | /** |
@@ -527,9 +527,9 @@ discard block |
||
527 | 527 | } |
528 | 528 | list($name, $url) = explode(':', $asset); |
529 | 529 | |
530 | - $baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
530 | + $baseUrl = str_replace(public_path().DIRECTORY_SEPARATOR, '', $this->getAssetsPath()); |
|
531 | 531 | |
532 | - $url = $this->url->asset($baseUrl . "/{$name}/" . $url); |
|
532 | + $url = $this->url->asset($baseUrl."/{$name}/".$url); |
|
533 | 533 | |
534 | 534 | return str_replace(['http://', 'https://'], '//', $url); |
535 | 535 | } |