Code Duplication    Length = 3-3 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

@@ 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(
185
                    $fieldName,
186
                    isset($fieldValues[ $fieldName ]) ? $fieldValues[ $fieldName ] : null,
187
                    true
188
                );
@@ 174-176 (lines=3) @@
171
        // if db model is instantiating
172
        if ($bydb) {
173
            // client code has indicated these field values are from the database
174
            foreach ($model_fields as $fieldName => $field) {
175
                $this->set_from_db(
176
                    $fieldName,
177
                    isset($fieldValues[ $fieldName ]) ? $fieldValues[ $fieldName ] : null
178
                );
179
            }