Code Duplication    Length = 3-3 lines in 3 locations

src/Intraface/modules/product/Product.php 1 location

@@ 178-180 (lines=3) @@
175
        $this->value['active']       = $this->db->f('active');
176
177
        // udtr�k af produktdetaljer
178
        for ($i = 0, $max = count($this->fields); $i < $max; $i++) {
179
            $this->value[$this->fields[$i]] = $this->db->f($this->fields[$i]);
180
        }
181
182
        // We now remove stock from load. It can be obtained manaully!
183
        // $this->getStock();

src/Intraface/modules/product/ProductDetail.php 1 location

@@ 87-89 (lines=3) @@
84
            throw new Exception('Der er mere end en aktiv produktdetalje');
85
        } elseif ($this->db->nextRecord()) {
86
            // hardcoded udtr�k af nogle vigtige oplysnigner, som vi ikke kan have i feltlisten
87
            for ($i = 0, $max = count($this->fields); $i<$max; $i++) {
88
                $this->value[$this->fields[$i]] = $this->db->f($this->fields[$i]);
89
            }
90
            $this->value['name'] = $this->db->f('name');
91
            $this->value['description'] = $this->db->f('description');
92
            $this->value['unit_key'] = $this->db->f('unit_key');

src/Intraface/NewAddress.php 1 location

@@ 119-121 (lines=3) @@
116
            throw new Exception('Der er mere end 1 aktiv adresse', FATAL);
117
        } elseif ($this->db->nextRecord()) {
118
            $this->value['address_id'] = $this->db->f('id');
119
            for ($i = 0, $max = count($this->fields); $i<$max; $i++) {
120
                $this->value[$this->fields[$i]] = $this->db->f($this->fields[$i]);
121
            }
122
            return $this->db->f('id');
123
        } else {
124
            return 0;