@@ -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 | /** |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | if ($files['size'] < $minSize || $files['size'] > $maxSize) { |
328 | 328 | $min = intval($minSize / 1000) ?: 1; |
329 | 329 | $max = intval($maxSize / 1000) ?: 1; |
330 | - $image->error = "Image size should be at least " . $min . " KB, and no more than " . $max . " KB"; |
|
330 | + $image->error = "Image size should be at least ".$min." KB, and no more than ".$max." KB"; |
|
331 | 331 | return null; |
332 | 332 | } |
333 | 333 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | list($allowedWidth, $allowedHeight) = $image->dimensions; |
336 | 336 | |
337 | 337 | if ($image->height > $allowedHeight || $image->width > $allowedWidth) { |
338 | - $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels'; |
|
338 | + $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels'; |
|
339 | 339 | return false; |
340 | 340 | } |
341 | 341 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | } |
346 | 346 | |
347 | 347 | /* set and get folder name */ |
348 | - $image->fullPath = $image->location . '/' . $image->name . '.' . $image->mime; |
|
348 | + $image->fullPath = $image->location.'/'.$image->name.'.'.$image->mime; |
|
349 | 349 | |
350 | 350 | /* gather image info for json storage */ |
351 | 351 | $image->serialize = array( |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | public function getName() |
378 | 378 | { |
379 | 379 | if (!$this->name) { |
380 | - return uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q'))); |
|
380 | + return uniqid('', true).'_'.str_shuffle(implode(range('e', 'q'))); |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | return $this->name; |
@@ -454,16 +454,16 @@ discard block |
||
454 | 454 | { |
455 | 455 | |
456 | 456 | if (!file_exists($dir) && !is_dir($dir) && !$this->location) { |
457 | - $createFolder = @mkdir('' . $dir, (int)$permission, true); |
|
457 | + $createFolder = @mkdir(''.$dir, (int) $permission, true); |
|
458 | 458 | if (!$createFolder) { |
459 | - $this->error = 'Error! Folder ' . $dir . ' could not be created'; |
|
459 | + $this->error = 'Error! Folder '.$dir.' could not be created'; |
|
460 | 460 | return false; |
461 | 461 | } |
462 | 462 | } |
463 | 463 | |
464 | 464 | /* check if we can create a file in the directory */ |
465 | 465 | if (!is_writable($dir)) { |
466 | - $this->error = "The images directory \"" . $dir . "\" is not writable!"; |
|
466 | + $this->error = "The images directory \"".$dir."\" is not writable!"; |
|
467 | 467 | return false; |
468 | 468 | } |
469 | 469 |