Code Duplication    Length = 6-6 lines in 2 locations

class/item.php 2 locations

@@ 1253-1258 (lines=6) @@
1250
            return $ret;
1251
        }
1252
        $theObjects = [];
1253
        while (false !== ($myrow = $this->db->fetchArray($result))) {
1254
            $item = new PublisherItem();
1255
            $item->assignVars($myrow);
1256
            $theObjects[$myrow['itemid']] = $item;
1257
            unset($item);
1258
        }
1259
        foreach ($theObjects as $theObject) {
1260
            if ('none' === $idKey) {
1261
                $ret[] = $theObject;
@@ 1824-1829 (lines=6) @@
1821
        $sql    .= ' GROUP BY categoryid)mo';
1822
        $sql    .= ' JOIN ' . $this->db->prefix($this->publisher->getDirname() . '_items') . ' mi ON mi.datesub = mo.date';
1823
        $result = $this->db->query($sql);
1824
        while (false !== ($row = $this->db->fetchArray($result))) {
1825
            $item = new PublisherItem();
1826
            $item->assignVars($row);
1827
            $ret[$row['categoryid']] = $item;
1828
            unset($item);
1829
        }
1830
1831
        return $ret;
1832
    }