@@ -127,18 +127,18 @@ discard block |
||
127 | 127 | * @param mixed $offset |
128 | 128 | * @param mixed $value |
129 | 129 | */ |
130 | - public function offsetSet($offset, $value){} |
|
130 | + public function offsetSet($offset, $value) {} |
|
131 | 131 | |
132 | 132 | /** |
133 | 133 | * @param mixed $offset |
134 | 134 | * @return null |
135 | 135 | */ |
136 | - public function offsetExists($offset){} |
|
136 | + public function offsetExists($offset) {} |
|
137 | 137 | |
138 | 138 | /** |
139 | 139 | * @param mixed $offset |
140 | 140 | */ |
141 | - public function offsetUnset($offset){} |
|
141 | + public function offsetUnset($offset) {} |
|
142 | 142 | |
143 | 143 | /** |
144 | 144 | * Gets array value \ArrayAccess |
@@ -211,9 +211,9 @@ discard block |
||
211 | 211 | public function setLocation($dir = "Uploads", $permission = 0666) |
212 | 212 | { |
213 | 213 | if (!file_exists($dir) && !is_dir($dir) && !$this->location) { |
214 | - $createFolder = @mkdir("" . $dir, (int) $permission, true); |
|
214 | + $createFolder = @mkdir("".$dir, (int) $permission, true); |
|
215 | 215 | if (!$createFolder) { |
216 | - throw new BulletproofException("Unable to create folder name: $dir in " . __DIR__); |
|
216 | + throw new BulletproofException("Unable to create folder name: $dir in ".__DIR__); |
|
217 | 217 | return; |
218 | 218 | } |
219 | 219 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | public function getName() |
245 | 245 | { |
246 | 246 | if (!$this->name) { |
247 | - return uniqid(true) . "_" . str_shuffle(implode(range("e", "q"))); |
|
247 | + return uniqid(true)."_".str_shuffle(implode(range("e", "q"))); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | return $this->name; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | public function getFullPath() |
259 | 259 | { |
260 | - $this->fullPath = $this->location . "/" . $this->name . "." . $this->mime; |
|
260 | + $this->fullPath = $this->location."/".$this->name.".".$this->mime; |
|
261 | 261 | return $this->fullPath; |
262 | 262 | } |
263 | 263 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | public function getLocation() |
310 | 310 | { |
311 | - if(!$this->location){ |
|
311 | + if (!$this->location) { |
|
312 | 312 | $this->setLocation(); |
313 | 313 | } |
314 | 314 | |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $files = $this->_files; |
350 | 350 | |
351 | 351 | /* check if required php extension is found */ |
352 | - if(!function_exists('exif_imagetype')){ |
|
352 | + if (!function_exists('exif_imagetype')) { |
|
353 | 353 | throw new BulletproofException("Function 'exif_imagetype' Not found. Please enable \"php_exif\" in your PHP.ini"); |
354 | 354 | } |
355 | 355 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | list($minSize, $maxSize) = $image->size; |
362 | 362 | |
363 | 363 | /* check for common upload errors first */ |
364 | - if($error = $this->commonErrors[$files["error"]]){ |
|
364 | + if ($error = $this->commonErrors[$files["error"]]) { |
|
365 | 365 | throw new BulletproofException($error); |
366 | 366 | } |
367 | 367 | |
@@ -388,13 +388,13 @@ discard block |
||
388 | 388 | throw new BulletproofException("invalid image width/height"); |
389 | 389 | } |
390 | 390 | |
391 | - if($image->height < 4 || $image->width < 4){ |
|
391 | + if ($image->height < 4 || $image->width < 4) { |
|
392 | 392 | throw new BulletproofException("invalid image width/height"); |
393 | 393 | |
394 | 394 | } |
395 | 395 | |
396 | 396 | /* set and get folder name */ |
397 | - $image->fullPath = $image->location. "/" . $image->name . "." . $image->mime; |
|
397 | + $image->fullPath = $image->location."/".$image->name.".".$image->mime; |
|
398 | 398 | |
399 | 399 | /* gather image info for json storage */ |
400 | 400 | $image->serialize = array( |