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