@@ -229,9 +229,9 @@ discard block |
||
229 | 229 | public function setLocation($dir = 'bulletproof', $permission = 0666) |
230 | 230 | { |
231 | 231 | if (!file_exists($dir) && !is_dir($dir) && !$this->location) { |
232 | - $createFolder = @mkdir('' . $dir, (int)$permission, true); |
|
232 | + $createFolder = @mkdir(''.$dir, (int) $permission, true); |
|
233 | 233 | if (!$createFolder) { |
234 | - $this->error = 'Error! Folder ' . $dir . ' could not be created'; |
|
234 | + $this->error = 'Error! Folder '.$dir.' could not be created'; |
|
235 | 235 | return false; |
236 | 236 | } |
237 | 237 | } |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | public function getName() |
263 | 263 | { |
264 | 264 | if (!$this->name) { |
265 | - return uniqid(true) . '_' . str_shuffle(implode(range('e', 'q'))); |
|
265 | + return uniqid(true).'_'.str_shuffle(implode(range('e', 'q'))); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | return $this->name; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | */ |
276 | 276 | public function getFullPath() |
277 | 277 | { |
278 | - $this->fullPath = $this->location . '/' . $this->name . '.' . $this->mime; |
|
278 | + $this->fullPath = $this->location.'/'.$this->name.'.'.$this->mime; |
|
279 | 279 | return $this->fullPath; |
280 | 280 | } |
281 | 281 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public function getSize() |
288 | 288 | { |
289 | - return (int)$this->_files['size']; |
|
289 | + return (int) $this->_files['size']; |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | /* check image size based on the settings */ |
417 | 417 | if ($files['size'] < $minSize || $files['size'] > $maxSize) { |
418 | 418 | $min = intval($minSize / 1000) ?: 1; |
419 | - $image->error = 'Image size should be at least more than ' . $min . ' kb'; |
|
419 | + $image->error = 'Image size should be at least more than '.$min.' kb'; |
|
420 | 420 | return false; |
421 | 421 | } |
422 | 422 | |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | list($allowedWidth, $allowedHeight) = $image->dimensions; |
425 | 425 | |
426 | 426 | if ($image->height > $allowedHeight || $image->width > $allowedWidth) { |
427 | - $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels'; |
|
427 | + $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels'; |
|
428 | 428 | return false; |
429 | 429 | } |
430 | 430 | |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | } |
435 | 435 | |
436 | 436 | /* set and get folder name */ |
437 | - $image->fullPath = $image->location . '/' . $image->name . '.' . $image->mime; |
|
437 | + $image->fullPath = $image->location.'/'.$image->name.'.'.$image->mime; |
|
438 | 438 | |
439 | 439 | /* gather image info for json storage */ |
440 | 440 | $image->serialize = array( |