@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public function getFullPath() |
197 | 197 | { |
198 | - $this->fullPath = $this->location . '/' . $this->name . '.' . $this->mime; |
|
198 | + $this->fullPath = $this->location.'/'.$this->name.'.'.$this->mime; |
|
199 | 199 | return $this->fullPath; |
200 | 200 | } |
201 | 201 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function getSize() |
208 | 208 | { |
209 | - return (int)$this->_files['size']; |
|
209 | + return (int) $this->_files['size']; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | if ($files['size'] < $minSize || $files['size'] > $maxSize) { |
324 | 324 | $min = intval($minSize / 1000) ?: 1; |
325 | 325 | $max = intval($maxSize / 1000) ?: 1; |
326 | - $image->error = 'Image size should be at least ' . $min . ' KB, and no more than ' . $max . ' KB'; |
|
326 | + $image->error = 'Image size should be at least '.$min.' KB, and no more than '.$max.' KB'; |
|
327 | 327 | return null; |
328 | 328 | } |
329 | 329 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | list($allowedWidth, $allowedHeight) = $image->dimensions; |
332 | 332 | |
333 | 333 | if ($image->height > $allowedHeight || $image->width > $allowedWidth) { |
334 | - $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels'; |
|
334 | + $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels'; |
|
335 | 335 | return false; |
336 | 336 | } |
337 | 337 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | } |
342 | 342 | |
343 | 343 | /* set and get folder name */ |
344 | - $image->fullPath = $image->location . '/' . $image->name . '.' . $image->mime; |
|
344 | + $image->fullPath = $image->location.'/'.$image->name.'.'.$image->mime; |
|
345 | 345 | |
346 | 346 | /* gather image info for json storage */ |
347 | 347 | $image->serialize = array( |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | public function getName() |
374 | 374 | { |
375 | 375 | if (!$this->name) { |
376 | - return uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q'))); |
|
376 | + return uniqid('', true).'_'.str_shuffle(implode(range('e', 'q'))); |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | return $this->name; |
@@ -450,16 +450,16 @@ discard block |
||
450 | 450 | { |
451 | 451 | |
452 | 452 | if (!file_exists($dir) && !is_dir($dir) && !$this->location) { |
453 | - $createFolder = @mkdir('' . $dir, (int)$permission, true); |
|
453 | + $createFolder = @mkdir(''.$dir, (int) $permission, true); |
|
454 | 454 | if (!$createFolder) { |
455 | - $this->error = 'Error! Folder ' . $dir . ' could not be created'; |
|
455 | + $this->error = 'Error! Folder '.$dir.' could not be created'; |
|
456 | 456 | return false; |
457 | 457 | } |
458 | 458 | } |
459 | 459 | |
460 | 460 | /* check if we can create a file in the directory */ |
461 | 461 | if (!is_writable($dir)) { |
462 | - $this->error = 'The images directory \'' . $dir . '\' is not writable!'; |
|
462 | + $this->error = 'The images directory \''.$dir.'\' is not writable!'; |
|
463 | 463 | return false; |
464 | 464 | } |
465 | 465 |