@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $lfm_type = 'file'; |
| 75 | 75 | |
| 76 | 76 | $request_type = lcfirst(str_singular($this->input('type') ?: '')); |
| 77 | - $available_types = array_keys($this->config->get('lfm.folder_categories') ?: []); |
|
| 77 | + $available_types = array_keys($this->config->get('lfm.folder_categories') ?: [ ]); |
|
| 78 | 78 | |
| 79 | 79 | if (in_array($request_type, $available_types)) { |
| 80 | 80 | $lfm_type = $request_type; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $view_type = 'grid'; |
| 92 | 92 | $target_display_type = $this->input('show_list') ?: $startup_view; |
| 93 | 93 | |
| 94 | - if (in_array($target_display_type, ['list', 'grid'])) { |
|
| 94 | + if (in_array($target_display_type, [ 'list', 'grid' ])) { |
|
| 95 | 95 | $view_type = $target_display_type; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function allowShareFolder() |
| 177 | 177 | { |
| 178 | - if (! $this->allowMultiUser()) { |
|
| 178 | + if (!$this->allowMultiUser()) { |
|
| 179 | 179 | return true; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | * @param mixed $variables Variables the message needs. |
| 230 | 230 | * @return string |
| 231 | 231 | */ |
| 232 | - public function error($error_type, $variables = []) |
|
| 232 | + public function error($error_type, $variables = [ ]) |
|
| 233 | 233 | { |
| 234 | 234 | throw new \Exception(trans(self::PACKAGE_NAME . '::lfm.error-' . $error_type, $variables)); |
| 235 | 235 | } |
@@ -241,11 +241,11 @@ discard block |
||
| 241 | 241 | */ |
| 242 | 242 | public static function routes() |
| 243 | 243 | { |
| 244 | - $middleware = array_merge([ CreateDefaultFolder::class, MultiUser::class ], \config('lfm.middlewares') ?? []); |
|
| 244 | + $middleware = array_merge([ CreateDefaultFolder::class, MultiUser::class ], \config('lfm.middlewares') ?? [ ]); |
|
| 245 | 245 | $as = 'unisharp.lfm.'; |
| 246 | 246 | $namespace = '\\UniSharp\\LaravelFilemanager\\Controllers\\'; |
| 247 | 247 | |
| 248 | - Route::group(compact('middleware', 'as', 'namespace'), function () { |
|
| 248 | + Route::group(compact('middleware', 'as', 'namespace'), function() { |
|
| 249 | 249 | |
| 250 | 250 | // display main layout |
| 251 | 251 | Route::get('/', [ |