Code Duplication    Length = 14-14 lines in 2 locations

lib/Kumbia/ActiveRecord/Query/mysql_limit.php 1 location

@@ 31-44 (lines=14) @@
28
 *
29
 * @return string
30
 */
31
function mysql_limit($sql, $limit = null, $offset = null)
32
{
33
    if ($limit !== null) {
34
        $limit = (int) $limit;
35
        $sql .= " LIMIT $limit";
36
    }
37
38
    if ($offset !== null) {
39
        $offset = (int) $offset;
40
        $sql .= " OFFSET $offset";
41
    }
42
43
    return $sql;
44
}
45

lib/Kumbia/ActiveRecord/Query/pgsql_limit.php 1 location

@@ 31-44 (lines=14) @@
28
 *
29
 * @return string
30
 */
31
function pgsql_limit($sql, $limit = null, $offset = null)
32
{
33
    if ($limit !== null) {
34
        $limit = (int) $limit;
35
        $sql .= " LIMIT $limit";
36
    }
37
38
    if ($offset !== null) {
39
        $offset = (int) $offset;
40
        $sql .= " OFFSET $offset";
41
    }
42
43
    return $sql;
44
}
45