@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | |
97 | 97 | public function folders() |
98 | 98 | { |
99 | - $all_folders = array_map(function ($directory_path) { |
|
99 | + $all_folders = array_map(function($directory_path) { |
|
100 | 100 | return $this->pretty($directory_path, true); |
101 | 101 | }, $this->storage->directories()); |
102 | 102 | |
103 | - $folders = array_filter($all_folders, function ($directory) { |
|
103 | + $folders = array_filter($all_folders, function($directory) { |
|
104 | 104 | return $directory->name !== $this->helper->getThumbFolderName(); |
105 | 105 | }); |
106 | 106 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | public function files() |
111 | 111 | { |
112 | - $files = array_map(function ($file_path) { |
|
112 | + $files = array_map(function($file_path) { |
|
113 | 113 | return $this->pretty($file_path); |
114 | 114 | }, $this->storage->files()); |
115 | 115 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $working_dir = $this->path('working_dir'); |
155 | 155 | $parent_dir = substr($working_dir, 0, strrpos($working_dir, '/')); |
156 | 156 | |
157 | - $parent_directories = array_map(function ($directory_path) { |
|
157 | + $parent_directories = array_map(function($directory_path) { |
|
158 | 158 | return app(static::class)->translateToLfmPath($directory_path); |
159 | 159 | }, app(static::class)->dir($parent_dir)->directories()); |
160 | 160 | |
@@ -200,20 +200,20 @@ discard block |
||
200 | 200 | public function sortByColumn($arr_items) |
201 | 201 | { |
202 | 202 | $sort_by = $this->helper->input('sort_type'); |
203 | - if (in_array($sort_by, ['name', 'time'])) { |
|
203 | + if (in_array($sort_by, [ 'name', 'time' ])) { |
|
204 | 204 | $key_to_sort = $sort_by; |
205 | 205 | } else { |
206 | 206 | $key_to_sort = 'name'; |
207 | 207 | } |
208 | 208 | |
209 | - uasort($arr_items, function ($a, $b) use ($key_to_sort) { |
|
209 | + uasort($arr_items, function($a, $b) use ($key_to_sort) { |
|
210 | 210 | return strcasecmp($a->{$key_to_sort}, $b->{$key_to_sort}); |
211 | 211 | }); |
212 | 212 | |
213 | 213 | return $arr_items; |
214 | 214 | } |
215 | 215 | |
216 | - public function error($error_type, $variables = []) |
|
216 | + public function error($error_type, $variables = [ ]) |
|
217 | 217 | { |
218 | 218 | throw new \Exception($this->helper->error($error_type, $variables)); |
219 | 219 | } |
@@ -253,9 +253,9 @@ discard block |
||
253 | 253 | $validator->nameIsNotDuplicate($this->getNewName($file), $this); |
254 | 254 | } |
255 | 255 | |
256 | - $validator->mimetypeIsNotExcutable(config('lfm.disallowed_mimetypes', ['text/x-php', 'text/html', 'text/plain'])); |
|
256 | + $validator->mimetypeIsNotExcutable(config('lfm.disallowed_mimetypes', [ 'text/x-php', 'text/html', 'text/plain' ])); |
|
257 | 257 | |
258 | - $validator->extensionIsNotExcutable(config('lfm.disallowed_extensions', ['php', 'html'])); |
|
258 | + $validator->extensionIsNotExcutable(config('lfm.disallowed_extensions', [ 'php', 'html' ])); |
|
259 | 259 | |
260 | 260 | if (config('lfm.should_validate_mime', false)) { |
261 | 261 | $validator->mimeTypeIsValid($this->helper->availableMimeTypes()); |
@@ -291,11 +291,11 @@ discard block |
||
291 | 291 | $file_name_without_extentions = $new_file_name; |
292 | 292 | while ($this->setName(($extension) ? $new_file_name_with_extention : $new_file_name)->exists()) { |
293 | 293 | if (config('lfm.alphanumeric_filename') === true) { |
294 | - $suffix = '_'.$counter; |
|
294 | + $suffix = '_' . $counter; |
|
295 | 295 | } else { |
296 | 296 | $suffix = " ({$counter})"; |
297 | 297 | } |
298 | - $new_file_name = $file_name_without_extentions.$suffix; |
|
298 | + $new_file_name = $file_name_without_extentions . $suffix; |
|
299 | 299 | |
300 | 300 | if ($extension) { |
301 | 301 | $new_file_name_with_extention = $new_file_name . '.' . $extension; |
@@ -114,13 +114,13 @@ |
||
114 | 114 | 'over_write_on_duplicate' => false, |
115 | 115 | |
116 | 116 | // mimetypes of executables to prevent from uploading |
117 | - 'disallowed_mimetypes' => ['text/x-php', 'text/html', 'text/plain'], |
|
117 | + 'disallowed_mimetypes' => [ 'text/x-php', 'text/html', 'text/plain' ], |
|
118 | 118 | |
119 | 119 | // extensions of executables to prevent from uploading |
120 | - 'disallowed_extensions' => ['php', 'html'], |
|
120 | + 'disallowed_extensions' => [ 'php', 'html' ], |
|
121 | 121 | |
122 | 122 | // Item Columns |
123 | - 'item_columns' => ['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'], |
|
123 | + 'item_columns' => [ 'name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url' ], |
|
124 | 124 | |
125 | 125 | /* |
126 | 126 | |-------------------------------------------------------------------------- |