Code Duplication    Length = 7-10 lines in 2 locations

_local/run.php 1 location

@@ 46-52 (lines=7) @@
43
    echo json_encode($ret);
44
}
45
46
function endswith($string, $test)
47
{
48
    $strlen = strlen($string);
49
    $testlen = strlen($test);
50
    if ($testlen > $strlen) return false;
51
    return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0;
52
}
53
54
function getDestinationsForID($id)
55
{

api/v1/aws.php 1 location

@@ 78-87 (lines=10) @@
75
    }
76
}
77
78
function endswith($string, $test)
79
{
80
    $strlen = strlen($string);
81
    $testlen = strlen($test);
82
    if($testlen > $strlen)
83
    {
84
        return false;
85
    }
86
    return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0;
87
}
88
89
function getDestinationsForID($id)
90
{