@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | public function recursiveSearch(string $folder, string $filename): array |
| 144 | 144 | { |
| 145 | 145 | // if that folder doesn't exist, then return an empty array to indicate that there is no $filename in such dir |
| 146 | - if (! is_dir($folder)) { |
|
| 146 | + if (!is_dir($folder)) { |
|
| 147 | 147 | return []; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - $ignoreFiles = function ($fileInfo) { |
|
| 150 | + $ignoreFiles = function($fileInfo) { |
|
| 151 | 151 | if (in_array($fileInfo->getFilename(), $this->config('scan.exclude', []))) { |
| 152 | 152 | return false; |
| 153 | 153 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | return true; |
| 156 | 156 | }; |
| 157 | 157 | |
| 158 | - $dir = new \RecursiveDirectoryIterator($folder, \FilesystemIterator::KEY_AS_PATHNAME|\FilesystemIterator::CURRENT_AS_FILEINFO|\FilesystemIterator::FOLLOW_SYMLINKS); |
|
| 158 | + $dir = new \RecursiveDirectoryIterator($folder, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::FOLLOW_SYMLINKS); |
|
| 159 | 159 | $filtered = new \RecursiveCallbackFilterIterator($dir, $ignoreFiles); |
| 160 | 160 | $ite = new \RecursiveIteratorIterator($filtered); |
| 161 | 161 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | public function all() : array |
| 205 | 205 | { |
| 206 | - if (! $this->config('cache.enabled')) { |
|
| 206 | + if (!$this->config('cache.enabled')) { |
|
| 207 | 207 | return $this->scan(); |
| 208 | 208 | } |
| 209 | 209 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | public function getCached() |
| 239 | 239 | { |
| 240 | - return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
| 240 | + return $this->cache->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
| 241 | 241 | return $this->toCollection()->toArray(); |
| 242 | 242 | }); |
| 243 | 243 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | { |
| 327 | 327 | $modules = $this->allEnabled(); |
| 328 | 328 | |
| 329 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
| 329 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
| 330 | 330 | if ($a->get('priority') === $b->get('priority')) { |
| 331 | 331 | return 0; |
| 332 | 332 | } |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | } |
| 487 | 487 | |
| 488 | 488 | $path = storage_path('app/modules/modules.used'); |
| 489 | - if (! $this->getFiles()->exists($path)) { |
|
| 489 | + if (!$this->getFiles()->exists($path)) { |
|
| 490 | 490 | $this->getFiles()->put($path, ''); |
| 491 | 491 | } |
| 492 | 492 | |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | */ |
| 581 | 581 | public function isDisabled(string $name) : bool |
| 582 | 582 | { |
| 583 | - return ! $this->isEnabled($name); |
|
| 583 | + return !$this->isEnabled($name); |
|
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | /** |