Completed
Push — master ( dacad6...6dee94 )
by samayo
01:17
created
src/bulletproof.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -229,9 +229,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         /* check image size based on the settings */
415 415
         if ($files['size'] < $minSize || $files['size'] > $maxSize) {
416 416
             $min = intval($minSize / 1000) ?: 1;
417
-            $image->error = 'Image size should be at least more than ' . $min . ' kb';
417
+            $image->error = 'Image size should be at least more than '.$min.' kb';
418 418
             return null;
419 419
         }
420 420
 
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         list($allowedWidth, $allowedHeight) = $image->dimensions;
423 423
 
424 424
         if ($image->height > $allowedHeight || $image->width > $allowedWidth) {
425
-            $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels';
425
+            $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels';
426 426
             return null;
427 427
         }
428 428
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
         }
433 433
 
434 434
         /* set and get folder name */
435
-        $image->fullPath = $image->location . '/' . $image->name . '.' . $image->mime;
435
+        $image->fullPath = $image->location.'/'.$image->name.'.'.$image->mime;
436 436
 
437 437
         /* gather image info for json storage */
438 438
         $image->serialize = array(
Please login to merge, or discard this patch.