Code Duplication    Length = 8-10 lines in 2 locations

class/object.php 2 locations

@@ 167-176 (lines=10) @@
164
            $obj =& $this->create(false);
165
            $obj->assignVars($myrow);
166
            if (!$id_as_key) {
167
                if ($as_object) {
168
                    $ret[] =& $obj;
169
                } else {
170
                    $row  = array();
171
                    $vars = $obj->getVars();
172
                    foreach (array_keys($vars) as $i) {
173
                        $row[$i] = $obj->getVar($i);
174
                    }
175
                    $ret[] = $row;
176
                }
177
            } else {
178
                if ($as_object) {
179
                    $ret[$myrow[$this->keyName]] =& $obj;
@@ 180-187 (lines=8) @@
177
            } else {
178
                if ($as_object) {
179
                    $ret[$myrow[$this->keyName]] =& $obj;
180
                } else {
181
                    $row  = array();
182
                    $vars = $obj->getVars();
183
                    foreach (array_keys($vars) as $i) {
184
                        $row[$i] = $obj->getVar($i);
185
                    }
186
                    $ret[$myrow[$this->keyName]] = $row;
187
                }
188
            }
189
            unset($obj);
190
        }