Completed
Pull Request — master (#7)
by Steve
03:38
created
src/Html/HtmlDiffer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@
 block discarded – undo
193 193
             $leftLength     = $leftEnd - $leftStart;
194 194
             $rightLength    = $rightEnd - $rightStart;
195 195
 
196
-            while  ($i + 1 < $iMax
196
+            while ($i + 1 < $iMax
197 197
                     && $differences[$i + 1]->kind() == $kind
198 198
                     && $this->score($leftLength, $differences[$i + 1]->leftLength(),
199 199
                                     $rightLength, $differences[$i + 1]->rightLength()) > ($differences[$i + 1]->leftStart() - $leftEnd)) {
Please login to merge, or discard this patch.
src/Html/Dom/ImageNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     {
22 22
         $this->attributes = $attributes;
23 23
 
24
-        $src = array_key_exists('src', $this->attributes)? mb_strtolower($this->attributes['src']) : '';
24
+        $src = array_key_exists('src', $this->attributes) ? mb_strtolower($this->attributes['src']) : '';
25 25
         parent::__construct($parent, "<img>{$src}</img>");
26 26
     }
27 27
 
Please login to merge, or discard this patch.
src/RangeDifferencer/RangeComparatorLCS.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,8 +159,8 @@
 block discarded – undo
159 159
             if ($s1 != -1 &&
160 160
                 ($s1 + 1 < $this->comparator1->getRangeCount() || $s2 + 1 < $this->comparator2->getRangeCount())) {
161 161
                 // TODO: we need to find the proper way of representing an append.
162
-                $leftStart  = $s1 < $this->comparator1->getRangeCount()? $s1 + 1 : $s1;
163
-                $rightStart = $s2 < $this->comparator2->getRangeCount()? $s2 + 1 : $s2;
162
+                $leftStart  = $s1 < $this->comparator1->getRangeCount() ? $s1 + 1 : $s1;
163
+                $rightStart = $s2 < $this->comparator2->getRangeCount() ? $s2 + 1 : $s2;
164 164
 
165 165
                 // TODO: We need to confirm that this is the proper order.
166 166
                 $differences[] = new RangeDifference(
Please login to merge, or discard this patch.
src/RangeDifferencer/Core/LCS.php 1 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/OldDifferencer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
         $lastDiagonal[$origin] = $row;
64 64
         $script[$origin] = null;
65 65
 
66
-        $lower = ($row == $rightSize)? $origin + 1 : $origin - 1;
67
-        $upper = ($row == $leftSize)?  $origin - 1 : $origin + 1;
66
+        $lower = ($row == $rightSize) ? $origin + 1 : $origin - 1;
67
+        $upper = ($row == $leftSize) ? $origin - 1 : $origin + 1;
68 68
 
69 69
         if ($lower > $upper) {
70 70
             return [];
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
@@ -206,12 +206,12 @@
 block discarded – undo
206 206
     public function equals(RangeDifference $other): bool
207 207
     {
208 208
         return
209
-            $this->kind           == $other->kind() &&
210
-            $this->leftStart      == $other->leftStart() &&
211
-            $this->leftLength     == $other->leftLength() &&
212
-            $this->rightStart     == $other->rightStart() &&
213
-            $this->rightLength    == $other->rightLength() &&
214
-            $this->ancestorStart  == $other->ancestorStart() &&
209
+            $this->kind == $other->kind() &&
210
+            $this->leftStart == $other->leftStart() &&
211
+            $this->leftLength == $other->leftLength() &&
212
+            $this->rightStart == $other->rightStart() &&
213
+            $this->rightLength == $other->rightLength() &&
214
+            $this->ancestorStart == $other->ancestorStart() &&
215 215
             $this->ancestorLength == $other->ancestorLength()
216 216
         ;
217 217
     }
Please login to merge, or discard this patch.