Code Duplication    Length = 3-11 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3420-3430 (lines=11) @@
3417
        }
3418
        //now, just verify they didn't pass anything wack
3419
        foreach ($query_params as $query_key => $query_value) {
3420
            if (! in_array($query_key, $this->_allowed_query_params, true)) {
3421
                throw new EE_Error(
3422
                    sprintf(
3423
                        __(
3424
                            "You passed %s as a query parameter to %s, which is illegal! The allowed query parameters are %s",
3425
                            'event_espresso'
3426
                        ),
3427
                        $query_key,
3428
                        get_class($this),
3429
                        //						print_r( $this->_allowed_query_params, TRUE )
3430
                        implode(',', $this->_allowed_query_params)
3431
                    )
3432
                );
3433
            }
@@ 4282-4284 (lines=3) @@
4279
            return $wpdb->prepare($field_obj->get_wpdb_data_type(),
4280
                $this->_prepare_value_for_use_in_db($value, $field_obj));
4281
        } else {//$field_obj should really just be a data type
4282
            if (! in_array($field_obj, $this->_valid_wpdb_data_types)) {
4283
                throw new EE_Error(sprintf(__("%s is not a valid wpdb datatype. Valid ones are %s", "event_espresso"),
4284
                    $field_obj, implode(",", $this->_valid_wpdb_data_types)));
4285
            }
4286
            return $wpdb->prepare($field_obj, $value);
4287
        }