Code Duplication    Length = 3-3 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

@@ 169-171 (lines=3) @@
166
        //if db model is instantiating
167
        if ($bydb) {
168
            //client code has indicated these field values are from the database
169
            foreach ($model_fields as $fieldName => $field) {
170
                $this->set_from_db($fieldName, isset($fieldValues[$fieldName]) ? $fieldValues[$fieldName] : null);
171
            }
172
        } else {
173
            //we're constructing a brand
174
            //new instance of the model object. Generally, this means we'll need to do more field validation
@@ 175-177 (lines=3) @@
172
        } else {
173
            //we're constructing a brand
174
            //new instance of the model object. Generally, this means we'll need to do more field validation
175
            foreach ($model_fields as $fieldName => $field) {
176
                $this->set($fieldName, isset($fieldValues[$fieldName]) ? $fieldValues[$fieldName] : null, true);
177
            }
178
        }
179
        //remember what values were passed to this constructor
180
        $this->_props_n_values_provided_in_constructor = $fieldValues;