@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace WSW\SimpleUpload\Traits\Upload; |
| 4 | 4 | |
| 5 | -use League\Flysystem\Adapter\Local; |
|
| 6 | - |
|
| 7 | 5 | /** |
| 8 | 6 | * Trait Validations |
| 9 | 7 | * @package WSW\SimpleUpload\Traits\Upload |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function setAllowedExtensions(array $ext) |
| 97 | 97 | { |
| 98 | - $this->allowed_extensions = array_map(function ($value) { |
|
| 98 | + $this->allowed_extensions = array_map(function($value) { |
|
| 99 | 99 | return mb_strtolower($value); |
| 100 | 100 | }, $ext); |
| 101 | 101 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | if ($this->uploadWithError()) { |
| 138 | - $msg = $this->translator->getMessage('errors.upload.'.$this->upload->getError()); |
|
| 138 | + $msg = $this->translator->getMessage('errors.upload.' . $this->upload->getError()); |
|
| 139 | 139 | throw new RuntimeException($msg, 500); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public static function createFromArray(array $data, Translator $translator = null) |
| 23 | 23 | { |
| 24 | - $translator = $translator ?: Translator::locate(); |
|
| 24 | + $translator = $translator ?: Translator::locate(); |
|
| 25 | 25 | |
| 26 | 26 | if (!array_key_exists('name', $data)) { |
| 27 | 27 | $msg = sprintf($translator->getMessage('validations.requiredField'), 'name'); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | if ($this->getAdapter() instanceof Local) { |
| 30 | 30 | $base = $this->getAdapter()->getPathPrefix(); |
| 31 | - $path = $this->setPathLocal($base, $path); |
|
| 31 | + $path = $this->setPathLocal($base, $path); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $this->getAdapter()->setPathPrefix($path); |