Passed
Push — master ( 420731...189c3f )
by Sebastian
02:15
created
src/BaseException.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
         try
60 60
         {
61 61
             throw new BaseException('');
62
-        }
63
-        catch(BaseException $e) 
62
+        } catch(BaseException $e) 
64 63
         {
65 64
             echo self::createInfo($e)->toString();
66 65
         }
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
         try
75 74
         {
76 75
             throw new BaseException('');
77
-        }
78
-        catch(BaseException $e)
76
+        } catch(BaseException $e)
79 77
         {
80 78
             echo '<pre style="background:#fff;font-family:monospace;font-size:14px;color:#444;padding:16px;border:solid 1px #999;border-radius:4px;">';
81 79
             echo self::createInfo($e)->toString();
Please login to merge, or discard this patch.
src/IniHelper/Line.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,14 +89,12 @@  discard block
 block discarded – undo
89 89
         if($startChar === ';')
90 90
         {
91 91
             $this->type = self::TYPE_COMMENT;
92
-        }
93
-        else if($startChar === '[')
92
+        } else if($startChar === '[')
94 93
         {
95 94
             $this->type = self::TYPE_SECTION_DECLARATION;
96 95
             $this->sectionName = trim($this->trimmed, '[]');
97 96
             $this->sectionName = trim($this->sectionName); // remove any whitespace
98
-        }
99
-        else
97
+        } else
100 98
         {
101 99
             $pos = strpos($this->trimmed, '=');
102 100
             if($pos === false) 
@@ -122,8 +120,7 @@  discard block
 block discarded – undo
122 120
         {
123 121
             $value = trim($value, '"');
124 122
             $this->quoteStyle = '"';
125
-        }
126
-        else if(substr($value, 0, 1) == "'" && substr($value, -1, 1) == "'")
123
+        } else if(substr($value, 0, 1) == "'" && substr($value, -1, 1) == "'")
127 124
         {
128 125
             $value = trim($value, "'");
129 126
             $this->quoteStyle = "'";
Please login to merge, or discard this patch.
src/IniHelper/Section.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -198,8 +198,7 @@  discard block
 block discarded – undo
198 198
                     } else {
199 199
                         $this->addValueLine($name, $values[$i]);
200 200
                     }
201
-                }
202
-                else 
201
+                } else 
203 202
                 {
204 203
                     $this->deleteLine($lines[$i]);
205 204
                 }
@@ -219,8 +218,7 @@  discard block
 block discarded – undo
219 218
                 foreach($lines as $delete) {
220 219
                     $this->deleteLine($delete);
221 220
                 }
222
-            }
223
-            else 
221
+            } else 
224 222
             {
225 223
                 $this->addValueLine($name, $value);
226 224
             }
@@ -258,8 +256,7 @@  discard block
 block discarded – undo
258 256
         if(empty($lines))
259 257
         {
260 258
             $this->addValueLine($name, $value);
261
-        }
262
-        else
259
+        } else
263 260
         {
264 261
             $found = false;
265 262
             
Please login to merge, or discard this patch.
src/URLInfo.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -443,12 +443,10 @@  discard block
 block discarded – undo
443 443
         if($this->isFragment === true)
444 444
         {
445 445
             return '#'.$this->getFragment();
446
-        }
447
-        else if($this->isPhone === true)
446
+        } else if($this->isPhone === true)
448 447
         {
449 448
             return 'tel://'.$this->getHost();
450
-        }
451
-        else if($this->isEmail === true)
449
+        } else if($this->isEmail === true)
452 450
         {
453 451
             return 'mailto:'.$this->getPath();
454 452
         }
@@ -598,13 +596,11 @@  discard block
 block discarded – undo
598 596
                             $tooltip,
599 597
                             $parts
600 598
                         );
601
-                    }
602
-                    else
599
+                    } else
603 600
                     {
604 601
                         continue;
605 602
                     }
606
-                }
607
-                else
603
+                } else
608 604
                 {
609 605
                     $tag = sprintf(
610 606
                         '<span class="link-param">%s</span>',
Please login to merge, or discard this patch.
src/FileHelper/FileFinder.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,8 +147,7 @@  discard block
 block discarded – undo
147 147
                 if($this->getOption('recursive') === true && !$item->isDot()) {
148 148
                     $this->find($item->getPathname());
149 149
                 }
150
-            }
151
-            else
150
+            } else
152 151
             {
153 152
                 $file = $this->filterFile($item->getPathname());
154 153
                 if($file) {
@@ -172,8 +171,7 @@  discard block
 block discarded – undo
172 171
             if(!in_array($info['extension'], $include)) {
173 172
                 return false;
174 173
             }
175
-        }
176
-        else if(!empty($exclude))
174
+        } else if(!empty($exclude))
177 175
         {
178 176
             if(in_array($info['extension'], $exclude)) {
179 177
                 return false;
Please login to merge, or discard this patch.
src/FileHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -197,8 +197,7 @@  discard block
 block discarded – undo
197 197
             if ($item->isDir()) 
198 198
             {
199 199
                 FileHelper::copyTree(str_replace('\\', '/', $itemPath), $target . '/' . $baseName);
200
-            } 
201
-            else if($item->isFile()) 
200
+            } else if($item->isFile()) 
202 201
             {
203 202
                 self::copyFile($itemPath, $target . '/' . $baseName);
204 203
             }
@@ -242,8 +241,7 @@  discard block
 block discarded – undo
242 241
         if(!file_exists($targetFolder))
243 242
         {
244 243
             self::createFolder($targetFolder);
245
-        }
246
-        else if(!is_writable($targetFolder)) 
244
+        } else if(!is_writable($targetFolder)) 
247 245
         {
248 246
             throw new FileHelper_Exception(
249 247
                 sprintf('Target folder [%s] is not writable.', basename($targetFolder)),
Please login to merge, or discard this patch.
src/NumberInfo.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -483,8 +483,7 @@  discard block
 block discarded – undo
483 483
         {
484 484
             $value = '';
485 485
             $key = '_EMPTY_';
486
-        } 
487
-        else 
486
+        } else 
488 487
         {
489 488
             $key = (string)$value;
490 489
         }
@@ -573,8 +572,7 @@  discard block
 block discarded – undo
573 572
             {
574 573
                 $number = null;
575 574
                 $cache[$key]['empty'] = true;
576
-            }
577
-            else
575
+            } else
578 576
             {
579 577
                 $number = $number * 1;
580 578
             }
Please login to merge, or discard this patch.
src/ImageHelper.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -151,8 +151,7 @@  discard block
 block discarded – undo
151 151
             $this->sourceImage = $resource;
152 152
             $this->type = $type;
153 153
             $this->info = self::getImageSize($resource);
154
-        } 
155
-        else 
154
+        } else 
156 155
         {
157 156
             $this->file = $sourceFile;
158 157
             if (!file_exists($this->file)) {
@@ -561,8 +560,7 @@  discard block
 block discarded – undo
561 560
         if ($this->width <= $this->height) 
562 561
         {
563 562
             $this->resampleByWidth($width);
564
-        } 
565
-        else 
563
+        } else 
566 564
         {
567 565
             $this->resampleByHeight($height);
568 566
         }
@@ -1037,8 +1035,7 @@  discard block
 block discarded – undo
1037 1035
         {
1038 1036
             $bg2 = imagecolorallocatealpha($im2, $color['red'], $color['green'], $color['blue'], $color['alpha']);
1039 1037
             imagecolortransparent($im2, $bg2);
1040
-        }
1041
-        else
1038
+        } else
1042 1039
         {
1043 1040
             $bg2 = imagecolorallocate($im2, $color['red'], $color['green'], $color['blue']);
1044 1041
         }
@@ -1348,8 +1345,7 @@  discard block
 block discarded – undo
1348 1345
 	    if(method_exists(__CLASS__, $method)) 
1349 1346
 	    {
1350 1347
 	        $info = call_user_func(array(__CLASS__, $method), $pathOrResource);
1351
-	    } 
1352
-	    else 
1348
+	    } else 
1353 1349
 	    {
1354 1350
 	        $info = getimagesize($pathOrResource);
1355 1351
 	    }
Please login to merge, or discard this patch.
src/ConvertHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -181,8 +181,7 @@  discard block
 block discarded – undo
181 181
          if($datefrom instanceof \DateTime)
182 182
          {
183 183
              $converter->setDateFrom($datefrom);
184
-         }
185
-         else
184
+         } else
186 185
          {
187 186
              $converter->setDateFrom(self::timestamp2date($datefrom)); 
188 187
          }
@@ -190,8 +189,7 @@  discard block
 block discarded – undo
190 189
          if($dateto instanceof \DateTime)
191 190
          {
192 191
              $converter->setDateTo($dateto);
193
-         }
194
-         else if($dateto > 0)
192
+         } else if($dateto > 0)
195 193
          {
196 194
              $converter->setDateTo(self::timestamp2date($dateto));
197 195
          }
Please login to merge, or discard this patch.