Code Duplication    Length = 10-10 lines in 2 locations

htdocs/class/model/read.php 1 location

@@ 70-79 (lines=10) @@
67
        $result = $this->handler->db->query($sql, $limit, $start);
68
        $ret    = array();
69
        if ($asObject) {
70
            while ($myrow = $this->handler->db->fetchArray($result)) {
71
                $object = $this->handler->create(false);
72
                $object->assignVars($myrow);
73
                if ($id_as_key) {
74
                    $ret[$myrow[$this->handler->keyName]] = $object;
75
                } else {
76
                    $ret[] = $object;
77
                }
78
                unset($object);
79
            }
80
        } else {
81
            $object = $this->handler->create(false);
82
            while ($myrow = $this->handler->db->fetchArray($result)) {

htdocs/modules/system/class/block.php 1 location

@@ 353-362 (lines=10) @@
350
        }
351
352
        if ($as_object) {
353
            while ($myrow = $this->db->fetchArray($result)) {
354
                $object = $this->create(false);
355
                $object->assignVars($myrow);
356
                if ($id_as_key) {
357
                    $ret[$myrow[$this->keyName]] = $object;
358
                } else {
359
                    $ret[] = $object;
360
                }
361
                unset($object);
362
            }
363
        } else {
364
            $object = $this->create(false);
365
            while ($myrow = $this->db->fetchArray($result)) {