Completed
Pull Request — master (#14)
by Mischa ter
01:22
created
src/DamerauLevenshtein.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
     ) {
101 101
         if (!empty($firstString) || !empty($secondString)) {
102 102
             $this->compOne = $firstString;
103
-            $this->compOneLength = (int)mb_strlen($this->compOne, 'UTF-8');
103
+            $this->compOneLength = (int) mb_strlen($this->compOne, 'UTF-8');
104 104
             $this->compTwo = $secondString;
105
-            $this->compTwoLength = (int)mb_strlen($this->compTwo, 'UTF-8');
105
+            $this->compTwoLength = (int) mb_strlen($this->compTwo, 'UTF-8');
106 106
         }
107 107
 
108 108
         $this->insCost = $insCost;
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             $maxCost += $extraSize * $this->insCost;
240 240
         }
241 241
 
242
-        return (int)$maxCost;
242
+        return (int) $maxCost;
243 243
     }
244 244
 
245 245
     /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
             $this->setupMatrix();
254 254
         }
255 255
 
256
-        return (float)(1 - ($this->getSimilarity() / $this->getMaximalDistance()));
256
+        return (float) (1 - ($this->getSimilarity() / $this->getMaximalDistance()));
257 257
     }
258 258
 
259 259
     /**
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         $oneSize = $this->compOneLength;
283 283
         $twoSize = $this->compTwoLength;
284 284
 
285
-        $out = '  ' . $this->compOne . PHP_EOL;
285
+        $out = '  '.$this->compOne.PHP_EOL;
286 286
         for ($y = 0; $y <= $twoSize; $y += 1) {
287 287
             if ($y - 1 < 0) {
288 288
                 $out .= ' ';
Please login to merge, or discard this patch.