Completed
Branch prettify (847d68)
by samayo
01:21
created
src/bulletproof.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -110,19 +110,19 @@  discard block
 block discarded – undo
110 110
      * @param mixed $value
111 111
      * @return null
112 112
      */
113
-    public function offsetSet($offset, $value){}
113
+    public function offsetSet($offset, $value) {}
114 114
 
115 115
     /**
116 116
      * @param mixed $offset
117 117
      * @return null
118 118
      */
119
-    public function offsetExists($offset){}
119
+    public function offsetExists($offset) {}
120 120
 
121 121
     /**
122 122
      * @param mixed $offset
123 123
      * @return null
124 124
      */
125
-    public function offsetUnset($offset){}
125
+    public function offsetUnset($offset) {}
126 126
 
127 127
     /**
128 128
      * Gets array value \ArrayAccess
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $this->_files = $this->_files[$offset];
147 147
 
148 148
         // check for common upload errors
149
-        if(isset($this->_files['error'])){
149
+        if (isset($this->_files['error'])) {
150 150
             $this->error = $this->commonUploadErrors[$this->_files['error']];
151 151
         }
152 152
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function getFullPath()
176 176
     {
177
-        $this->fullPath = $this->location . '/' . $this->name . '.' . $this->mime;
177
+        $this->fullPath = $this->location.'/'.$this->name.'.'.$this->mime;
178 178
         return $this->fullPath;
179 179
     }
180 180
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     public function getJson()
211 211
     {
212 212
         /* gather image info for json storage */
213
-        return json_encode (
213
+        return json_encode(
214 214
             array(
215 215
                 'name'      => $this->name,
216 216
                 'mime'      => $this->mime,
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     public function getName()
286 286
     {
287 287
         if (!$this->name) {
288
-            return uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q')));
288
+            return uniqid('', true).'_'.str_shuffle(implode(range('e', 'q')));
289 289
         }
290 290
 
291 291
         return $this->name;
@@ -361,16 +361,16 @@  discard block
 block discarded – undo
361 361
     public function setLocation($dir = 'bulletproof', $permission = 0666)
362 362
     {
363 363
         if (!file_exists($dir) && !is_dir($dir)) {
364
-            $createFolder = @mkdir('' . $dir, (int) $permission, true);
364
+            $createFolder = @mkdir(''.$dir, (int) $permission, true);
365 365
             if (!$createFolder) {
366
-                $this->error = 'Error! Folder ' . $dir . ' could not be created';
366
+                $this->error = 'Error! Folder '.$dir.' could not be created';
367 367
                 return false;
368 368
             }
369 369
         }
370 370
 
371 371
         /* check if we can create a file in the directory */
372 372
         if (!is_writable($dir)) {
373
-            $this->error = 'The images directory \'' . $dir . '\' is not writable!';
373
+            $this->error = 'The images directory \''.$dir.'\' is not writable!';
374 374
             return false;
375 375
         }
376 376
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         if ($files['size'] < $minSize || $files['size'] > $maxSize) {
417 417
             $min = intval($minSize / 1000) ?: 1;
418 418
             $max = intval($maxSize / 1000) ?: 1;
419
-            $image->error = 'Image size should be at least ' . $min . ' KB, and no more than ' . $max . ' KB';
419
+            $image->error = 'Image size should be at least '.$min.' KB, and no more than '.$max.' KB';
420 420
             return false;
421 421
         }
422 422
 
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
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
 
Please login to merge, or discard this patch.