Completed
Pull Request — master (#10)
by Akpé Aurelle Emmanuel Moïse
02:10
created
src/levenshteinDistance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
         
84 84
         private static function handleDamerau(&$a, &$b, &$dis_new, &$dis, $x, $y, $c)
85 85
         {
86
-            if ($x > 1 && $y > 1 && $a[$x-1] == $b[$y-2] && $a[$x-2] == $b[$y-1]) {
87
-                $dis_new[$y]= min($dis_new[$y-1], $dis[$y-3] + $c) ;
86
+            if ($x > 1 && $y > 1 && $a[$x - 1] == $b[$y - 2] && $a[$x - 2] == $b[$y - 1]) {
87
+                $dis_new[$y] = min($dis_new[$y - 1], $dis[$y - 3] + $c);
88 88
             }
89 89
         }
90 90
     }
Please login to merge, or discard this patch.