@@ -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,7 +46,7 @@ discard block |
||
| 46 | 46 | $response = count($error_bag) > 0 ? $error_bag : array(parent::$success_response); |
| 47 | 47 | } else { // upload via ckeditor 'Upload' tab |
| 48 | 48 | if (is_null($new_filename)) { |
| 49 | - $response = $error_bag[0]; |
|
| 49 | + $response = $error_bag[ 0 ]; |
|
| 50 | 50 | } else { |
| 51 | 51 | $response = view(Lfm::PACKAGE_NAME . '::use') |
| 52 | 52 | ->withFile($this->lfm->setName($new_filename)->url()); |