Code Duplication    Length = 5-5 lines in 2 locations

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
            }

framework/db/DBObject.php 1 location

@@ 541-545 (lines=5) @@
538
                } elseif (is_array($this->dbQuery->limit) && count($this->dbQuery->limit) == 2) {
539
                    $offset = $this->dbQuery->limit[0];
540
                    $count = $this->dbQuery->limit[1];
541
                    if (Tools::isInteger($offset) && Tools::isInteger($count)) {
542
                        $this->dbQuery->query.= " LIMIT " . $offset . ", " . $count;
543
                    } else {
544
                        throw new DBCoreException("Invalid LIMIT param in select() method.");
545
                    }
546
                } else {
547
                    throw new DBCoreException("Invalid LIMIT param in select() method.");
548
                }