Passed
Pull Request — master (#10)
by Akpé Aurelle Emmanuel Moïse
01:49
created

dice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
/**
4
*
5
* @Name : similar-text
6
* @Programmer : Akpé Aurelle Emmanuel Moïse Zinsou
7
* @Date : 2019-04-01
8
* @Released under : https://github.com/manuwhat/similar-text/blob/master/LICENSE
9
* @Repository : https://github.com/manuwhat/similar
10
*
11
**/
12
namespace{
13
    use EZAMA\similar_text;
14
    use EZAMA\Distance;
15
16
    function SimilarText(
17
        $firstString,
18
        $secondString,
19
        $round = 2,
20
        $insensitive = true,
21
        &$stats = false,
22
        $getParts = false,
23
        $checkposition = false
24
                        ) {
25
        return similar_text::similarText(
26
            $firstString,
27
            $secondString,
28
            $round,
29
            $insensitive,
30
            $stats,
31
            $getParts,
32
            $checkposition
33
                                        );
34
    }
35
    
36
    function areAnagrams($a, $b)
37
    {
38
        return Distance::areAnagrams($a, $b);
39
    }
40
    
41
    function similarButNotEqual($a, $b)
42
    {
43
        return   Distance::similarButNotEqual($a, $b);
44
    }
45
    
46
    function aIsSuperStringOfB($a, $b)
47
    {
48
        return Distance::aIsSuperStringOfB($a, $b);
49
    }
50
        
51
    function haveSameRoot($a, $b)
52
    {
53
        return Distance::haveSameRoot($a, $b);
54
    }
55
    
56
    function wordsReorderOccured($a, $b, $considerPunctuation = true)
57
    {
58
        return Distance::wordsReorderOccured($a, $b, $considerPunctuation);
59
    }
60
    
61
    function punctuationChangesOccured($a, $b, $considerSpace = true)
62
    {
63
        return Distance::punctuationChangesOccured($a, $b, $considerSpace);
64
    }
65
    
66
    function areStems($a, $b)
67
    {
68
        return Distance::areStems($a, $b);
69
    }
70
    
71
    function strippedUrl($a, $b)
72
    {
73
        return Distance::strippedUrl($a, $b);
74
    }
75
    
76
    function acronymOrExpanded($a, $b)
77
    {
78
        return Distance::acronymOrExpanded($a, $b);
79
    }
80
    
81
    function wordsAddedOrRemoved($a, $b)
82
    {
83
        return Distance::wordsAddedOrRemoved($a, $b);
84
    }
85
    
86
    function _levenshtein($a, $b)
87
    {
88
        return Distance::levenshtein($a, $b);
89
    }
90
    
91
    
92
    function levenshteinDamerau($a, $b)
93
    {
94
        return Distance::levenshteinDamerau($a, $b);
95
    }
96
    
97
    
98
    function dice($a, $b, $round=2)
99
    {
100
        return Distance::dice($a, $b, $round);
101
    }
102
    
103
    
104
    function hamming($a, $b)
105
    {
106
        return Distance::hamming($a, $b);
107
    }
108
    
109
    
110
    function jaroWinkler($a, $b, $round=2)
111
    {
112
        return Distance::jaroWinkler($a, $b, $round);
113
    }
114
    
115
}
116