Code Duplication    Length = 14-22 lines in 2 locations

class/setting.php 1 location

@@ 609-622 (lines=14) @@
606
     *
607
     * @return mixed
608
     */
609
    public function getSets(
610
        $limit = 0,
611
        $start = 0,
612
        $otherCriteria = null,
613
        $sort = 'set_id',
614
        $order = 'DESC',
615
        $fields = null,
616
        $asObject = true,
617
        $id_as_key = true
618
    ) {
619
        $criteria = new CriteriaCompo();
620
        if (!empty($otherCriteria)) {
621
            $criteria->add($otherCriteria);
622
        }
623
        $criteria->setLimit($limit);
624
        $criteria->setStart($start);
625
        $criteria->setSort($sort);

class/log.php 1 location

@@ 1074-1095 (lines=22) @@
1071
     *
1072
     * @return mixed
1073
     */
1074
    public function getLogs(
1075
        $limit = 0,
1076
        $start = 0,
1077
        $otherCriteria = null,
1078
        $sort = 'log_id',
1079
        $order = 'DESC',
1080
        $fields = null,
1081
        $asObject = true,
1082
        $id_as_key = true
1083
    ) {
1084
        $criteria = new CriteriaCompo();
1085
        if (!empty($otherCriteria)) {
1086
            $criteria->add($otherCriteria);
1087
        }
1088
        $criteria->setLimit($limit);
1089
        $criteria->setStart($start);
1090
        $criteria->setSort($sort);
1091
        $criteria->setOrder($order);
1092
        $ret =& $this->getAll($criteria, $fields, $asObject, $id_as_key);
1093
1094
        return $ret;
1095
    }
1096
1097
    /**
1098
     * @param null $criteria