Code Duplication    Length = 3-11 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2955-2965 (lines=11) @@
2952
		}
2953
		//now, just verify they didn't pass anything wack
2954
		foreach ( $query_params as $query_key => $query_value ) {
2955
			if ( ! in_array( $query_key, $this->_allowed_query_params, true ) ) {
2956
				throw new EE_Error(
2957
					sprintf(
2958
						__(
2959
							"You passed %s as a query parameter to %s, which is illegal! The allowed query parameters are %s",
2960
							'event_espresso'
2961
						),
2962
						$query_key,
2963
						get_class( $this ),
2964
//						print_r( $this->_allowed_query_params, TRUE )
2965
						implode( ',', $this->_allowed_query_params )
2966
					)
2967
				);
2968
			}
@@ 3637-3639 (lines=3) @@
3634
		if($field_obj instanceof EE_Model_Field_Base){
3635
			return $wpdb->prepare($field_obj->get_wpdb_data_type(),$this->_prepare_value_for_use_in_db($value, $field_obj));
3636
		}else{//$field_obj should really just be a data type
3637
			if( ! in_array($field_obj,$this->_valid_wpdb_data_types)){
3638
				throw new EE_Error(sprintf(__("%s is not a valid wpdb datatype. Valid ones are %s", "event_espresso"),$field_obj,implode(",",$this->_valid_wpdb_data_types)));
3639
			}
3640
			return $wpdb->prepare($field_obj,$value);
3641
		}
3642
	}