Code Duplication    Length = 8-8 lines in 2 locations

src/Database/DBMysqlFunctions.php 1 location

@@ 31-38 (lines=8) @@
28
     * @param int $qty
29
     * @return string
30
     */
31
    function limit($sql, $start, $qty)
32
    {
33
        if (strpos($sql, ' LIMIT ') === false) {
34
            return $sql .= " LIMIT $start, $qty ";
35
        } else {
36
            return $sql;
37
        }
38
    }
39
40
    /**
41
     * Given a SQL returns it with the proper TOP or equivalent method included

src/Database/DBPgsqlFunctions.php 1 location

@@ 25-32 (lines=8) @@
22
     * @param int $qty
23
     * @return string
24
     */
25
    function limit($sql, $start, $qty)
26
    {
27
        if (strpos($sql, ' LIMIT ') === false) {
28
            return $sql .= " LIMIT $qty OFFSET $start ";
29
        } else {
30
            return $sql;
31
        }
32
    }
33
34
    /**
35
     * Given a SQL returns it with the proper TOP or equivalent method included