@@ -176,8 +176,7 @@ discard block |
||
176 | 176 | $end1 = strlen($this->string1) - 1; |
177 | 177 | $end2 = strlen($this->string2) - 1; |
178 | 178 | $totalSequence = strlen($this->sequence1); |
179 | - } |
|
180 | - else |
|
179 | + } else |
|
181 | 180 | { |
182 | 181 | $this->sequence1 = $this->splitString($this->string1); |
183 | 182 | $this->sequence2 = $this->splitString($this->string2); |
@@ -281,7 +280,7 @@ discard block |
||
281 | 280 | if ($this->sequence1[$index1 + $start - 1] |
282 | 281 | === $this->sequence2[$index2 + $start - 1]){ |
283 | 282 | $table[$index1][$index2] = $table[$index1 - 1][$index2 - 1] + 1; |
284 | - }else{ |
|
283 | + } else{ |
|
285 | 284 | $table[$index1][$index2] = |
286 | 285 | max($table[$index1 - 1][$index2], $table[$index1][$index2 - 1]); |
287 | 286 | } |
@@ -325,16 +324,14 @@ discard block |
||
325 | 324 | $diff[] = array($this->sequence1[$index1 + $start - 1], self::UNMODIFIED); |
326 | 325 | $index1 --; |
327 | 326 | $index2 --; |
328 | - } |
|
329 | - elseif ( |
|
327 | + } elseif ( |
|
330 | 328 | $index2 > 0 |
331 | 329 | && $table[$index1][$index2] === $table[$index1][$index2 - 1] |
332 | 330 | ) { |
333 | 331 | // update the diff and the indices |
334 | 332 | $diff[] = array($this->sequence2[$index2 + $start - 1], self::INSERTED); |
335 | 333 | $index2 --; |
336 | - } |
|
337 | - else |
|
334 | + } else |
|
338 | 335 | { |
339 | 336 | // update the diff and the indices |
340 | 337 | $diff[] = array($this->sequence1[$index1 + $start - 1], self::DELETED); |