Completed
Branch prettify (695764)
by samayo
01:20
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
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         // check for common upload errors
149 149
 
150
-        if(isset($this->_files['error'])){
150
+        if (isset($this->_files['error'])) {
151 151
             $this->error = $this->commonUploadErrors[$this->_files['error']];
152 152
         }
153 153
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getFullPath()
177 177
     {
178
-        $this->fullPath = $this->location . '/' . $this->name . '.' . $this->mime;
178
+        $this->fullPath = $this->location.'/'.$this->name.'.'.$this->mime;
179 179
         return $this->fullPath;
180 180
     }
181 181
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     public function getJson()
212 212
     {
213 213
         /* gather image info for json storage */
214
-        return json_encode (
214
+        return json_encode(
215 215
             array(
216 216
                 'name'      => $this->name,
217 217
                 'mime'      => $this->mime,
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     public function getName()
287 287
     {
288 288
         if (!$this->name) {
289
-            return uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q')));
289
+            return uniqid('', true).'_'.str_shuffle(implode(range('e', 'q')));
290 290
         }
291 291
 
292 292
         return $this->name;
@@ -362,16 +362,16 @@  discard block
 block discarded – undo
362 362
     public function setLocation($dir = 'bulletproof', $permission = 0666)
363 363
     {
364 364
         if (!file_exists($dir) && !is_dir($dir) && !$this->location) {
365
-            $createFolder = @mkdir('' . $dir, (int) $permission, true);
365
+            $createFolder = @mkdir(''.$dir, (int) $permission, true);
366 366
             if (!$createFolder) {
367
-                $this->error = 'Error! Folder ' . $dir . ' could not be created';
367
+                $this->error = 'Error! Folder '.$dir.' could not be created';
368 368
                 return false;
369 369
             }
370 370
         }
371 371
 
372 372
         /* check if we can create a file in the directory */
373 373
         if (!is_writable($dir)) {
374
-            $this->error = 'The images directory \'' . $dir . '\' is not writable!';
374
+            $this->error = 'The images directory \''.$dir.'\' is not writable!';
375 375
             return false;
376 376
         }
377 377
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
         if ($files['size'] < $minSize || $files['size'] > $maxSize) {
418 418
             $min = intval($minSize / 1000) ?: 1;
419 419
             $max = intval($maxSize / 1000) ?: 1;
420
-            $image->error = 'Image size should be at least ' . $min . ' KB, and no more than ' . $max . ' KB';
420
+            $image->error = 'Image size should be at least '.$min.' KB, and no more than '.$max.' KB';
421 421
             return false;
422 422
         }
423 423
 
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
         list($allowedWidth, $allowedHeight) = $image->dimensions;
426 426
 
427 427
         if ($image->height > $allowedHeight || $image->width > $allowedWidth) {
428
-            $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels';
428
+            $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels';
429 429
             return false;
430 430
         }
431 431
 
Please login to merge, or discard this patch.