@@ -110,19 +110,19 @@ discard block |
||
110 | 110 | * @param mixed $value |
111 | 111 | * @return null |
112 | 112 | */ |
113 | - public function offsetSet($offset, $value){} |
|
113 | + public function offsetSet($offset, $value) {} |
|
114 | 114 | |
115 | 115 | /** |
116 | 116 | * @param mixed $offset |
117 | 117 | * @return null |
118 | 118 | */ |
119 | - public function offsetExists($offset){} |
|
119 | + public function offsetExists($offset) {} |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * @param mixed $offset |
123 | 123 | * @return null |
124 | 124 | */ |
125 | - public function offsetUnset($offset){} |
|
125 | + public function offsetUnset($offset) {} |
|
126 | 126 | |
127 | 127 | /** |
128 | 128 | * Gets array value \ArrayAccess |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $this->_files = $this->_files[$offset]; |
147 | 147 | |
148 | 148 | // check for common upload errors |
149 | - if(isset($this->_files['error'])){ |
|
149 | + if (isset($this->_files['error'])) { |
|
150 | 150 | $this->error = $this->commonUploadErrors[$this->_files['error']]; |
151 | 151 | } |
152 | 152 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | public function getFullPath() |
176 | 176 | { |
177 | - return $this->fullPath = $this->getLocation() . '/' . $this->getName() . '.' . $this->getMime(); |
|
177 | + return $this->fullPath = $this->getLocation().'/'.$this->getName().'.'.$this->getMime(); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | public function getJson() |
210 | 210 | { |
211 | 211 | /* gather image info for json storage */ |
212 | - return json_encode ( |
|
212 | + return json_encode( |
|
213 | 213 | array( |
214 | 214 | 'name' => $this->name, |
215 | 215 | 'mime' => $this->mime, |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | public function getName() |
285 | 285 | { |
286 | 286 | if (!$this->name) { |
287 | - return uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q'))); |
|
287 | + return uniqid('', true).'_'.str_shuffle(implode(range('e', 'q'))); |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | return $this->name; |
@@ -373,15 +373,15 @@ discard block |
||
373 | 373 | { |
374 | 374 | $isDirectoryValid = $this->isDirectoryValid($dir); |
375 | 375 | |
376 | - if(!$isDirectoryValid){ |
|
377 | - $this->error = 'Can not create a folder \'' . $dir . '\', please check your dir permission issues'; |
|
376 | + if (!$isDirectoryValid) { |
|
377 | + $this->error = 'Can not create a folder \''.$dir.'\', please check your dir permission issues'; |
|
378 | 378 | return false; |
379 | 379 | } |
380 | 380 | |
381 | - $create = !is_dir($dir) ? @mkdir('' . $dir, (int) $permission, true) : true; |
|
381 | + $create = !is_dir($dir) ? @mkdir(''.$dir, (int) $permission, true) : true; |
|
382 | 382 | |
383 | 383 | if (!$create) { |
384 | - $this->error = 'Error! Folder ' . $dir . ' could not be created'; |
|
384 | + $this->error = 'Error! Folder '.$dir.' could not be created'; |
|
385 | 385 | return false; |
386 | 386 | } |
387 | 387 | |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | if ($files['size'] < $minSize || $files['size'] > $maxSize) { |
427 | 427 | $min = intval($minSize / 1000) ?: 1; |
428 | 428 | $max = intval($maxSize / 1000) ?: 1; |
429 | - $image->error = 'Image size should be at least ' . $min . ' KB, and no more than ' . $max . ' KB'; |
|
429 | + $image->error = 'Image size should be at least '.$min.' KB, and no more than '.$max.' KB'; |
|
430 | 430 | return false; |
431 | 431 | } |
432 | 432 | |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | list($allowedWidth, $allowedHeight) = $image->dimensions; |
435 | 435 | |
436 | 436 | if ($image->height > $allowedHeight || $image->width > $allowedWidth) { |
437 | - $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels'; |
|
437 | + $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels'; |
|
438 | 438 | return false; |
439 | 439 | } |
440 | 440 |