Completed
Branch prettify (768db4)
by samayo
01:48
created
src/bulletproof.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -114,21 +114,21 @@  discard block
 block discarded – undo
114 114
      * 
115 115
      * @return null
116 116
      */
117
-    public function offsetSet($offset, $value){}
117
+    public function offsetSet($offset, $value) {}
118 118
 
119 119
     /**
120 120
      * @param mixed $offset
121 121
      * 
122 122
      * @return null
123 123
      */
124
-    public function offsetExists($offset){}
124
+    public function offsetExists($offset) {}
125 125
 
126 126
     /**
127 127
      * @param mixed $offset
128 128
      * 
129 129
      * @return null
130 130
      */
131
-    public function offsetUnset($offset){}
131
+    public function offsetUnset($offset) {}
132 132
 
133 133
     /**
134 134
      * Gets array value \ArrayAccess
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
       $this->_files = $this->_files[$offset];
153 153
 
154 154
       // check for common upload errors
155
-      if(isset($this->_files['error'])){
155
+      if (isset($this->_files['error'])) {
156 156
           $this->error = $this->commonUploadErrors[$this->_files['error']];
157 157
       }
158 158
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function getFullPath()
182 182
     {
183
-      return $this->fullPath = $this->getLocation() . '/' . $this->getName() . '.' . $this->getMime();
183
+      return $this->fullPath = $this->getLocation().'/'.$this->getName().'.'.$this->getMime();
184 184
     }
185 185
 
186 186
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function getJson()
216 216
     {
217
-      return json_encode (
217
+      return json_encode(
218 218
         array(
219 219
           'name'      => $this->name,
220 220
           'mime'      => $this->mime,
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function getMime()
236 236
     {
237
-      if(!$this->mime){
237
+      if (!$this->mime) {
238 238
         $this->mime = $this->getImageMime($this->_files['tmp_name']);
239 239
       }
240 240
       
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     public function getName()
290 290
     {
291 291
       if (!$this->name) {
292
-        $this->name = uniqid('', true) . '_' . str_shuffle(implode(range('e', 'q')));
292
+        $this->name = uniqid('', true).'_'.str_shuffle(implode(range('e', 'q')));
293 293
       }
294 294
 
295 295
       return $this->name;
@@ -376,15 +376,15 @@  discard block
 block discarded – undo
376 376
     {
377 377
       $isDirectoryValid = $this->isDirectoryValid($dir); 
378 378
 
379
-      if(!$isDirectoryValid){
380
-        $this->error = 'Can not create a directory  \'' . $dir . '\', please check your dir permission';
379
+      if (!$isDirectoryValid) {
380
+        $this->error = 'Can not create a directory  \''.$dir.'\', please check your dir permission';
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
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
       if ($files['size'] < $minSize || $files['size'] > $maxSize) {
430 430
         $min = intval($minSize / 1000) ?: 1;
431 431
         $max = intval($maxSize / 1000) ?: 1;
432
-        $image->error = 'Image size should be at least ' . $min . ' KB, and no more than ' . $max . ' KB';
432
+        $image->error = 'Image size should be at least '.$min.' KB, and no more than '.$max.' KB';
433 433
         return false;
434 434
       }
435 435
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
           $image->height < 2 ||
443 443
           $image->width < 2
444 444
         ) {
445
-        $image->error = 'Image height/width should be less than ' . $allowedHeight . '/' . $allowedWidth . ' pixels';
445
+        $image->error = 'Image height/width should be less than '.$allowedHeight.'/'.$allowedWidth.' pixels';
446 446
         return false;
447 447
       }
448 448
 
Please login to merge, or discard this patch.