Completed
Pull Request — master (#7)
by Steve
03:26
created
src/RangeDifferencer/Core/LCS.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@
 block discarded – undo
62 62
         $max = min($length1, $length2);
63 63
 
64 64
         for ($forwardBound = 0;
65
-             $forwardBound < $max && $this->isRangeEqual($forwardBound, $forwardBound);
66
-             $forwardBound++) {
65
+                $forwardBound < $max && $this->isRangeEqual($forwardBound, $forwardBound);
66
+                $forwardBound++) {
67 67
             $this->setLcs($forwardBound, $forwardBound);
68 68
         }
69 69
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -162,14 +162,14 @@
 block discarded – undo
162 162
         $M = $topL2 - $bottomL2 + 1;
163 163
 
164 164
         $delta  = $N - $M;
165
-        $isEven = ($delta & 1) == 1? false : true;
165
+        $isEven = ($delta & 1) == 1 ? false : true;
166 166
 
167 167
         $limit = min($this->maxDifferences, intval(ceil(($N + $M + 1) / 2)));
168 168
 
169 169
         // Offset to make it odd/even.
170 170
         // a 0 or 1 that we add to the start offset to make it odd/even
171
-        $valueToAddForward  = ($M & 1) == 1? 1 : 0;
172
-        $valueToAddBackward = ($N & 1) == 1? 1 : 0;
171
+        $valueToAddForward  = ($M & 1) == 1 ? 1 : 0;
172
+        $valueToAddBackward = ($N & 1) == 1 ? 1 : 0;
173 173
 
174 174
         $startForward  = -$M;
175 175
         $endForward    = $N;
Please login to merge, or discard this patch.
src/RangeDifferencer/RangeDifference.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -282,12 +282,12 @@
 block discarded – undo
282 282
     public function equals(RangeDifference $other): bool
283 283
     {
284 284
         return
285
-            $this->kind           === $other->getKind() &&
286
-            $this->leftStart      === $other->getLeftStart() &&
287
-            $this->leftLength     === $other->getLeftLength() &&
288
-            $this->rightStart     === $other->getRightStart() &&
289
-            $this->rightLength    === $other->getRightLength() &&
290
-            $this->ancestorStart  === $other->getAncestorStart() &&
285
+            $this->kind === $other->getKind() &&
286
+            $this->leftStart === $other->getLeftStart() &&
287
+            $this->leftLength === $other->getLeftLength() &&
288
+            $this->rightStart === $other->getRightStart() &&
289
+            $this->rightLength === $other->getRightLength() &&
290
+            $this->ancestorStart === $other->getAncestorStart() &&
291 291
             $this->ancestorLength === $other->getAncestorLength();
292 292
     }
293 293
 
Please login to merge, or discard this patch.