@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function __construct() |
16 | 16 | { |
17 | 17 | parent::__construct(); |
18 | - $this->errors = []; |
|
18 | + $this->errors = [ ]; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | public function upload() |
28 | 28 | { |
29 | 29 | $uploaded_files = Arr::flatten(request()->file('upload')); |
30 | - $error_bag = []; |
|
30 | + $error_bag = [ ]; |
|
31 | 31 | $new_filename = null; |
32 | 32 | |
33 | - foreach (is_array($uploaded_files) ? $uploaded_files : [$uploaded_files] as $file) { |
|
33 | + foreach (is_array($uploaded_files) ? $uploaded_files : [ $uploaded_files ] as $file) { |
|
34 | 34 | try { |
35 | 35 | $new_filename = $this->lfm->upload($file); |
36 | 36 | } catch (\Exception $e) { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } else { // upload via ckeditor5 expects json responses |
49 | 49 | if (is_null($new_filename)) { |
50 | 50 | $response = [ |
51 | - 'error' => [ 'message' => $error_bag[0] ] |
|
51 | + 'error' => [ 'message' => $error_bag[ 0 ] ] |
|
52 | 52 | ]; |
53 | 53 | } else { |
54 | 54 | $url = $this->lfm->setName($new_filename)->url(); |