@@ -164,9 +164,7 @@ discard block |
||
| 164 | 164 | if(empty($leftCell)) |
| 165 | 165 | { |
| 166 | 166 | return 'empty'; |
| 167 | - } |
|
| 168 | - |
|
| 169 | - else if($leftCell !== $rightCell) |
|
| 167 | + } else if($leftCell !== $rightCell) |
|
| 170 | 168 | { |
| 171 | 169 | return 'del'; |
| 172 | 170 | } |
@@ -179,9 +177,7 @@ discard block |
||
| 179 | 177 | if(empty($rightCell)) |
| 180 | 178 | { |
| 181 | 179 | return 'empty'; |
| 182 | - } |
|
| 183 | - |
|
| 184 | - else if($leftCell !== $rightCell) |
|
| 180 | + } else if($leftCell !== $rightCell) |
|
| 185 | 181 | { |
| 186 | 182 | return 'ins'; |
| 187 | 183 | } |
@@ -191,8 +191,7 @@ discard block |
||
| 191 | 191 | $end1 = strlen($this->string1) - 1; |
| 192 | 192 | $end2 = strlen($this->string2) - 1; |
| 193 | 193 | $totalSequence = strlen($this->sequence1); |
| 194 | - } |
|
| 195 | - else |
|
| 194 | + } else |
|
| 196 | 195 | { |
| 197 | 196 | $this->sequence1 = $this->splitString($this->string1); |
| 198 | 197 | $this->sequence2 = $this->splitString($this->string2); |
@@ -296,7 +295,7 @@ discard block |
||
| 296 | 295 | if ($this->sequence1[$index1 + $start - 1] |
| 297 | 296 | == $this->sequence2[$index2 + $start - 1]){ |
| 298 | 297 | $table[$index1][$index2] = $table[$index1 - 1][$index2 - 1] + 1; |
| 299 | - }else{ |
|
| 298 | + } else{ |
|
| 300 | 299 | $table[$index1][$index2] = |
| 301 | 300 | max($table[$index1 - 1][$index2], $table[$index1][$index2 - 1]); |
| 302 | 301 | } |
@@ -340,16 +339,14 @@ discard block |
||
| 340 | 339 | $diff[] = array($this->sequence1[$index1 + $start - 1], self::UNMODIFIED); |
| 341 | 340 | $index1 --; |
| 342 | 341 | $index2 --; |
| 343 | - } |
|
| 344 | - elseif ( |
|
| 342 | + } elseif ( |
|
| 345 | 343 | $index2 > 0 |
| 346 | 344 | && $table[$index1][$index2] == $table[$index1][$index2 - 1] |
| 347 | 345 | ) { |
| 348 | 346 | // update the diff and the indices |
| 349 | 347 | $diff[] = array($this->sequence2[$index2 + $start - 1], self::INSERTED); |
| 350 | 348 | $index2 --; |
| 351 | - } |
|
| 352 | - else |
|
| 349 | + } else |
|
| 353 | 350 | { |
| 354 | 351 | // update the diff and the indices |
| 355 | 352 | $diff[] = array($this->sequence1[$index1 + $start - 1], self::DELETED); |