@@ -115,7 +115,7 @@ |
||
115 | 115 | if (is_array($split)) { |
116 | 116 | return |
117 | 117 | array_map( |
118 | - function ($val) { |
|
118 | + function($val) { |
|
119 | 119 | if (self::is_ascii($val)) { |
120 | 120 | return strtolower($val); |
121 | 121 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | public static function wordsReorderOccured($a, $b, $considerPunctuation = true) |
38 | 38 | { |
39 | - $filter = function ($v) use ($considerPunctuation) { |
|
39 | + $filter = function($v) use ($considerPunctuation) { |
|
40 | 40 | return $considerPunctuation ? !(ctype_space($v) || ctype_punct($v)) : !ctype_space($v); |
41 | 41 | }; |
42 | 42 | return self::similarText($a, $b, 2, true, $check, true) && is_array($check) && self::wro_filter($check, $filter) ?true :false; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | if (!is_string($a) || !is_string($b)) { |
46 | 46 | return false; |
47 | 47 | } |
48 | - $filter = function ($v) { |
|
48 | + $filter = function($v) { |
|
49 | 49 | return !(ctype_space($v)); |
50 | 50 | }; |
51 | 51 | self::filter($a, $b, $filter, true); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public static function punctuationChangesOccured($a, $b, $insensitive = true, $considerSpace = true) |
57 | 57 | { |
58 | - $filter = function ($v) use ($considerSpace) { |
|
58 | + $filter = function($v) use ($considerSpace) { |
|
59 | 59 | return $considerSpace ? !(ctype_space($v) || ctype_punct($v)) : !ctype_punct($v); |
60 | 60 | }; |
61 | 61 | if (!is_string($a) || !is_string($b)) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (!is_string($a) || !is_string($b)) { |
72 | 72 | return false; |
73 | 73 | } |
74 | - $filter = function ($v) { |
|
74 | + $filter = function($v) { |
|
75 | 75 | return !(ctype_space($v[0]) || ctype_punct($v[0])); |
76 | 76 | }; |
77 | 77 |
@@ -55,10 +55,10 @@ |
||
55 | 55 | { |
56 | 56 | if (function_exists('array_key_last')) { |
57 | 57 | $end = array_key_last($a); |
58 | - $end = count((array)self::split($end))>1 ? 0 : 1; |
|
58 | + $end = count((array) self::split($end)) > 1 ? 0 : 1; |
|
59 | 59 | } else { |
60 | 60 | $end = end($a); |
61 | - $end = count((array)self::split($end))>1 ? 0 : 1; |
|
61 | + $end = count((array) self::split($end)) > 1 ? 0 : 1; |
|
62 | 62 | reset($a); |
63 | 63 | } |
64 | 64 | return $end; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $t /= 2; |
42 | 42 | $distance['jaro'] = 1 / 3 * ($corresponding / $ca + $corresponding / $cb + ($corresponding - $t) / $corresponding); |
43 | 43 | $distance['jaro-winkler'] = $distance['jaro'] + (min($longCommonSubstr, 4) * 0.1 * (1 - $distance['jaro'])); |
44 | - $distance = array_map(function ($v) use ($round) { |
|
44 | + $distance = array_map(function($v) use ($round) { |
|
45 | 45 | return round($v, $round); |
46 | 46 | }, $distance); |
47 | 47 |