Completed
Pull Request — master (#7)
by Steve
03:38
created
src/Html/Ancestor/TextOnlyComparator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
36 36
         foreach ($tree as $child) {
37 37
             if ($child instanceof TagNode) {
38 38
                 $this->addRecursive($child);
39
-            }
40
-            elseif ($child instanceof TextNode) {
39
+            } elseif ($child instanceof TextNode) {
41 40
                 $this->leafs[] = $child;
42 41
             }
43 42
         }
Please login to merge, or discard this patch.
src/RangeDifferencer/RangeComparatorLCS.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,8 +135,7 @@
 block discarded – undo
135 135
                     // There is a diff at the beginning.
136 136
                     // TODO: We need to confirm that this is the proper order.
137 137
                     $differences[] = new RangeDifference(RangeDifference::CHANGE, 0, $end2, 0, $end1);
138
-                }
139
-                elseif ($end1 != $s1 + 1 || $end2 != $s2 + 1) {
138
+                } elseif ($end1 != $s1 + 1 || $end2 != $s2 + 1) {
140 139
                     // A diff was found on one of the sides.
141 140
                     $leftStart   = $s1 + 1;
142 141
                     $leftLength  = $end1 - $leftStart;
Please login to merge, or discard this patch.
src/RangeDifferencer/RangeDifferencer.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,11 +101,9 @@
 block discarded – undo
101 101
             // Take the next diff that is closer to the start.
102 102
             if (null === $myIter->getDifference()) {
103 103
                 $startThread = $yourIter;
104
-            }
105
-            elseif (null === $yourIter->getDifference()) {
104
+            } elseif (null === $yourIter->getDifference()) {
106 105
                 $startThread = $myIter;
107
-            }
108
-            else {
106
+            } else {
109 107
                 // Not at end of both scripts take the lowest range.
110 108
                 if ($myIter->getDifference()->leftStart() <= $yourIter->getDifference()->leftStart()) {
111 109
                     $startThread = $myIter;
Please login to merge, or discard this patch.
src/RangeDifferencer/Core/LCS.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -253,8 +253,7 @@  discard block
 block discarded – undo
253 253
                 if ($x <= 0) {
254 254
                     $startBackward = $k + 1;
255 255
                     $valueToAddBackward = 0;
256
-                }
257
-                elseif ($y <= 0 && $endBackward > $k - 1) {
256
+                } elseif ($y <= 0 && $endBackward > $k - 1) {
258 257
                     $endBackward = $k - 1;
259 258
                 }
260 259
             }
@@ -324,8 +323,7 @@  discard block
 block discarded – undo
324 323
                 $maxProgress[0][0] = $x;
325 324
                 $maxProgress[0][1] = $y;
326 325
                 $maxProgress[0][2] = $progress;
327
-            }
328
-            elseif ($progress == $maxProgress[0][2]) {
326
+            } elseif ($progress == $maxProgress[0][2]) {
329 327
                 $numProgress++;
330 328
                 $maxProgress[$numProgress][0] = $x;
331 329
                 $maxProgress[$numProgress][1] = $y;
@@ -353,8 +351,7 @@  discard block
 block discarded – undo
353 351
                 $maxProgress[0][0] = $x;
354 352
                 $maxProgress[0][1] = $y;
355 353
                 $maxProgress[0][2] = $progress;
356
-            }
357
-            elseif ($progress == $maxProgress[0][2] && !$maxProgressForward) {
354
+            } elseif ($progress == $maxProgress[0][2] && !$maxProgressForward) {
358 355
                 $numProgress++;
359 356
                 $maxProgress[$numProgress][0] = $x;
360 357
                 $maxProgress[$numProgress][1] = $y;
Please login to merge, or discard this patch.