Code Duplication    Length = 5-5 lines in 2 locations

framework/db/DBObject.php 1 location

@@ 532-536 (lines=5) @@
529
                } elseif (is_array($this->dbQuery->limit) && count($this->dbQuery->limit) == 2) {
530
                    $offset = $this->dbQuery->limit[0];
531
                    $count = $this->dbQuery->limit[1];
532
                    if (Tools::isInteger($offset) && Tools::isInteger($count)) {
533
                        $this->dbQuery->query.= " LIMIT " . $offset . ", " . $count;
534
                    } else {
535
                        throw new DBCoreException("Invalid LIMIT param in select() method.");
536
                    }
537
                } else {
538
                    throw new DBCoreException("Invalid LIMIT param in select() method.");
539
                }

framework/db/DBPreparedQuery.php 1 location

@@ 121-125 (lines=5) @@
118
            } elseif (is_array($this->limit) && count($this->limit) == 2) {
119
                $offset = $this->limit[0];
120
                $count = $this->limit[1];
121
                if (Tools::isInteger($offset) && Tools::isInteger($count)) {
122
                    $this->query.= " LIMIT " . $offset . ", " . $count;
123
                } else {
124
                    throw new DBCoreException("Invalid LIMIT param in select() method.");
125
                }
126
            } else {
127
                throw new DBCoreException("Invalid LIMIT param in select() method.");
128
            }