Code Duplication    Length = 3-3 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

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