@@ -120,14 +120,14 @@ discard block |
||
120 | 120 | * |
121 | 121 | * @param mixed $offset |
122 | 122 | */ |
123 | - public function offsetExists($offset){} |
|
123 | + public function offsetExists($offset) {} |
|
124 | 124 | |
125 | 125 | /** |
126 | 126 | * \ArrayAccess unused method |
127 | 127 | * |
128 | 128 | * @param mixed $offset |
129 | 129 | */ |
130 | - public function offsetUnset($offset){} |
|
130 | + public function offsetUnset($offset) {} |
|
131 | 131 | |
132 | 132 | /** |
133 | 133 | * \ArrayAccess - get array value from object |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public function getPath() |
179 | 179 | { |
180 | - return $this->path = $this->getStorage() . '/' . $this->getName() . '.' . $this->getMime(); |
|
180 | + return $this->path = $this->getStorage().'/'.$this->getName().'.'.$this->getMime(); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -299,8 +299,8 @@ discard block |
||
299 | 299 | { |
300 | 300 | if ($isNameProvided) { |
301 | 301 | $this->name = filter_var($isNameProvided, FILTER_SANITIZE_STRING); |
302 | - }else{ |
|
303 | - $this->name = uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q'))); |
|
302 | + } else { |
|
303 | + $this->name = uniqid('', true).'_'.str_shuffle(implode(range('e', 'q'))); |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | return $this; |
@@ -381,10 +381,10 @@ discard block |
||
381 | 381 | return false; |
382 | 382 | } |
383 | 383 | |
384 | - $create = !is_dir($dir) ? @mkdir('' . $dir, (int) $permission, true) : true; |
|
384 | + $create = !is_dir($dir) ? @mkdir(''.$dir, (int) $permission, true) : true; |
|
385 | 385 | |
386 | 386 | if (!$create) { |
387 | - $this->error = 'Error! directory \'' . $dir . '\' could not be created'; |
|
387 | + $this->error = 'Error! directory \''.$dir.'\' could not be created'; |
|
388 | 388 | return false; |
389 | 389 | } |
390 | 390 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | public function validateMimes() { |
398 | 398 | $this->getImageMime($this->_files['tmp_name']); |
399 | 399 | |
400 | - if(!in_array($this->mime, $this->mimeTypes)) { |
|
400 | + if (!in_array($this->mime, $this->mimeTypes)) { |
|
401 | 401 | $this->error = sprintf('Invalid File! Only (%s) image types are allowed', implode(', ', $this->mimeTypes)); |
402 | 402 | return false; |
403 | 403 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $this->height = $this->getHeight(); |
425 | 425 | |
426 | 426 | if ($this->height > $maxHeight || $this->width > $maxWidth) { |
427 | - $this->error = 'Image should be smaller than ' . $maxHeight . 'px in height, and smaller than ' . $maxWidth . 'px in width'; |
|
427 | + $this->error = 'Image should be smaller than '.$maxHeight.'px in height, and smaller than '.$maxWidth.'px in width'; |
|
428 | 428 | return false; |
429 | 429 | } |
430 | 430 |