Code Duplication    Length = 3-11 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3513-3523 (lines=11) @@
3510
        }
3511
        //now, just verify they didn't pass anything wack
3512
        foreach ($query_params as $query_key => $query_value) {
3513
            if (! in_array($query_key, $this->_allowed_query_params, true)) {
3514
                throw new EE_Error(
3515
                    sprintf(
3516
                        __(
3517
                            "You passed %s as a query parameter to %s, which is illegal! The allowed query parameters are %s",
3518
                            'event_espresso'
3519
                        ),
3520
                        $query_key,
3521
                        get_class($this),
3522
                        //						print_r( $this->_allowed_query_params, TRUE )
3523
                        implode(',', $this->_allowed_query_params)
3524
                    )
3525
                );
3526
            }
@@ 4375-4377 (lines=3) @@
4372
            return $wpdb->prepare($field_obj->get_wpdb_data_type(),
4373
                $this->_prepare_value_for_use_in_db($value, $field_obj));
4374
        } //$field_obj should really just be a data type
4375
        if (! in_array($field_obj, $this->_valid_wpdb_data_types)) {
4376
            throw new EE_Error(
4377
                sprintf(
4378
                    __("%s is not a valid wpdb datatype. Valid ones are %s", "event_espresso"),
4379
                    $field_obj, implode(",", $this->_valid_wpdb_data_types)
4380
                )