@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function show() |
| 37 | 37 | { |
| 38 | - $key_auth_token = \config('lfm')['key_auth_token']; |
|
| 39 | - $no_authenticate_redirect_to = \config('lfm')['no_authenticate_token_redirect_to']; |
|
| 38 | + $key_auth_token = \config('lfm')[ 'key_auth_token' ]; |
|
| 39 | + $no_authenticate_redirect_to = \config('lfm')[ 'no_authenticate_token_redirect_to' ]; |
|
| 40 | 40 | |
| 41 | 41 | return view('laravel-filemanager::index', compact('key_auth_token', 'no_authenticate_redirect_to')) |
| 42 | 42 | ->withHelper($this->helper); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function getErrors() |
| 51 | 51 | { |
| 52 | - $arr_errors = []; |
|
| 52 | + $arr_errors = [ ]; |
|
| 53 | 53 | |
| 54 | 54 | if (!extension_loaded('gd') && !extension_loaded('imagick')) { |
| 55 | 55 | array_push($arr_errors, trans('laravel-filemanager::lfm.message-extension_not_found')); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | return $arr_errors; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - public function error($error_type, $variables = []) |
|
| 77 | + public function error($error_type, $variables = [ ]) |
|
| 78 | 78 | { |
| 79 | 79 | return $this->helper->error($error_type, $variables); |
| 80 | 80 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function applyIniOverrides() |
| 88 | 88 | { |
| 89 | - $overrides = config('lfm.php_ini_overrides', []); |
|
| 89 | + $overrides = config('lfm.php_ini_overrides', [ ]); |
|
| 90 | 90 | |
| 91 | 91 | if ($overrides && is_array($overrides) && count($overrides) === 0) { |
| 92 | 92 | return; |
@@ -115,17 +115,17 @@ discard block |
||
| 115 | 115 | if ($auth->check()) { |
| 116 | 116 | $response = [ |
| 117 | 117 | 'message' => 'Authorization', |
| 118 | - 'errors' => [], |
|
| 118 | + 'errors' => [ ], |
|
| 119 | 119 | 'data' => [ |
| 120 | 120 | 'authorization' => true, |
| 121 | 121 | 'redirect_to' => null, |
| 122 | 122 | ] |
| 123 | 123 | ]; |
| 124 | - $status_code = 200; |
|
| 124 | + $status_code = 200; |
|
| 125 | 125 | } else { |
| 126 | 126 | $response = [ |
| 127 | 127 | 'message' => 'No authorization', |
| 128 | - 'errors' => [], |
|
| 128 | + 'errors' => [ ], |
|
| 129 | 129 | 'data' => [ |
| 130 | 130 | 'authorization' => false, |
| 131 | 131 | 'redirect_to' => \config('lfm.no_authenticate_token_redirect_to'), |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | return \response([ |
| 140 | 140 | 'message' => 'Error machine', |
| 141 | 141 | 'errors' => [ |
| 142 | - 'machine' => [$e->getMessage()], |
|
| 142 | + 'machine' => [ $e->getMessage() ], |
|
| 143 | 143 | ], |
| 144 | - 'data' => [], |
|
| 144 | + 'data' => [ ], |
|
| 145 | 145 | ], 500); |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $path_parts = pathinfo($path); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - return substr($path_parts[$part_name], 1); |
|
| 64 | + return substr($path_parts[ $part_name ], 1); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public function allowFolderType($type) |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $lfm_type = 'file'; |
| 91 | 91 | |
| 92 | 92 | $request_type = lcfirst(Str::singular($this->input('type') ?: '')); |
| 93 | - $available_types = array_keys($this->config->get('lfm.folder_categories') ?: []); |
|
| 93 | + $available_types = array_keys($this->config->get('lfm.folder_categories') ?: [ ]); |
|
| 94 | 94 | |
| 95 | 95 | if (in_array($request_type, $available_types)) { |
| 96 | 96 | $lfm_type = $request_type; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $view_type = 'grid'; |
| 108 | 108 | $target_display_type = $this->input('show_list') ?: $startup_view; |
| 109 | 109 | |
| 110 | - if (in_array($target_display_type, ['list', 'grid'])) { |
|
| 110 | + if (in_array($target_display_type, [ 'list', 'grid' ])) { |
|
| 111 | 111 | $view_type = $target_display_type; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * @param mixed $variables Variables the message needs. |
| 249 | 249 | * @return string |
| 250 | 250 | */ |
| 251 | - public function error($error_type, $variables = []) |
|
| 251 | + public function error($error_type, $variables = [ ]) |
|
| 252 | 252 | { |
| 253 | 253 | throw new \Exception(trans(self::PACKAGE_NAME . '::lfm.error-' . $error_type, $variables)); |
| 254 | 254 | } |
@@ -260,11 +260,11 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | public static function routes() |
| 262 | 262 | { |
| 263 | - $middleware = [CreateDefaultFolder::class, MultiUser::class]; |
|
| 263 | + $middleware = [ CreateDefaultFolder::class, MultiUser::class ]; |
|
| 264 | 264 | $as = 'unisharp.lfm.'; |
| 265 | 265 | $namespace = '\\UniSharp\\LaravelFilemanager\\Controllers\\'; |
| 266 | 266 | |
| 267 | - Route::group(compact('middleware', 'as', 'namespace'), function () { |
|
| 267 | + Route::group(compact('middleware', 'as', 'namespace'), function() { |
|
| 268 | 268 | |
| 269 | 269 | // display main layout |
| 270 | 270 | Route::get('/', [ |
@@ -280,9 +280,9 @@ discard block |
||
| 280 | 280 | }); |
| 281 | 281 | |
| 282 | 282 | |
| 283 | - $config_middleware = \config('lfm.middleware') ?? []; |
|
| 283 | + $config_middleware = \config('lfm.middleware') ?? [ ]; |
|
| 284 | 284 | $middleware = array_merge($middleware, $config_middleware); |
| 285 | - Route::group(compact('middleware', 'as', 'namespace'), function () { |
|
| 285 | + Route::group(compact('middleware', 'as', 'namespace'), function() { |
|
| 286 | 286 | |
| 287 | 287 | // display integration error messages |
| 288 | 288 | Route::get('/errors', [ |