@@ -54,6 +54,11 @@ |
||
| 54 | 54 | unlink($this->getFileByKey($key, 'tmp_name')); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | + /** |
|
| 58 | + * @param string $property |
|
| 59 | + * |
|
| 60 | + * @return string |
|
| 61 | + */ |
|
| 57 | 62 | private function getFileByKey($key, $property) |
| 58 | 63 | { |
| 59 | 64 | if (!isset($_FILES[$key])) { |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $newName = $this->getFileName($key); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - move_uploaded_file($this->getFileByKey($key, 'tmp_name'), $destinationPath . '/' . $newName); |
|
| 49 | + move_uploaded_file($this->getFileByKey($key, 'tmp_name'), $destinationPath.'/'.$newName); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public function clearTemp($key) |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | public function add($object) |
| 14 | 14 | { |
| 15 | 15 | if (is_string($object)) { |
| 16 | - $object = [ $object ]; |
|
| 16 | + $object = [$object]; |
|
| 17 | 17 | } |
| 18 | 18 | if (!is_object($object) && !is_array($object)) { |
| 19 | 19 | throw new HttpResponseException('You can add only object'); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function process() |
| 28 | 28 | { |
| 29 | 29 | $collection = (array)$this->collection; |
| 30 | - if (count($collection)===1) { |
|
| 30 | + if (count($collection) === 1) { |
|
| 31 | 31 | $collection = $collection[0]; |
| 32 | 32 | } |
| 33 | 33 | |