Code Duplication    Length = 3-3 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

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