Code Duplication    Length = 3-11 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3408-3418 (lines=11) @@
3405
        }
3406
        //now, just verify they didn't pass anything wack
3407
        foreach ($query_params as $query_key => $query_value) {
3408
            if (! in_array($query_key, $this->_allowed_query_params, true)) {
3409
                throw new EE_Error(
3410
                    sprintf(
3411
                        __(
3412
                            "You passed %s as a query parameter to %s, which is illegal! The allowed query parameters are %s",
3413
                            'event_espresso'
3414
                        ),
3415
                        $query_key,
3416
                        get_class($this),
3417
                        //						print_r( $this->_allowed_query_params, TRUE )
3418
                        implode(',', $this->_allowed_query_params)
3419
                    )
3420
                );
3421
            }
@@ 4242-4244 (lines=3) @@
4239
            return $wpdb->prepare($field_obj->get_wpdb_data_type(),
4240
                $this->_prepare_value_for_use_in_db($value, $field_obj));
4241
        } else {//$field_obj should really just be a data type
4242
            if (! in_array($field_obj, $this->_valid_wpdb_data_types)) {
4243
                throw new EE_Error(sprintf(__("%s is not a valid wpdb datatype. Valid ones are %s", "event_espresso"),
4244
                    $field_obj, implode(",", $this->_valid_wpdb_data_types)));
4245
            }
4246
            return $wpdb->prepare($field_obj, $value);
4247
        }