Code Duplication    Length = 3-11 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3113-3118 (lines=6) @@
3110
				throw new EE_Error( sprintf( __("The '%s' operator must be used with an array of values and there must be exactly TWO values in that array.", 'event_espresso'), "BETWEEN" ) );
3111
			$cleaned_value = $this->_construct_between_value( $value, $field_obj );
3112
			return $operator.SP.$cleaned_value;
3113
		} elseif( in_array( $operator, $this->_null_style_operators ) ) {
3114
			if($value != NULL){
3115
				throw new EE_Error(sprintf(__("You attempted to give a value  (%s) while using a NULL-style operator (%s). That isn't valid", "event_espresso"),$value,$operator));
3116
			}
3117
			return $operator;
3118
		}elseif( $operator == 'LIKE' && ! is_array($value)){
3119
			//if the operator is 'LIKE', we want to allow percent signs (%) and not
3120
			//remove other junk. So just treat it as a string.
3121
			return $operator.SP.$this->_wpdb_prepare_using_field($value, '%s');
@@ 3124-3126 (lines=3) @@
3121
			return $operator.SP.$this->_wpdb_prepare_using_field($value, '%s');
3122
		}elseif( ! in_array($operator, $this->_in_style_operators) && ! is_array($value)){
3123
			return $operator.SP.$this->_wpdb_prepare_using_field($value,$field_obj);
3124
		}elseif(in_array($operator, $this->_in_style_operators) && ! is_array($value)){
3125
			throw new EE_Error(sprintf(__("Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))",'event_espresso'),$operator, $operator));
3126
		}elseif( ! in_array($operator, $this->_in_style_operators) && is_array($value)){
3127
			throw new EE_Error(sprintf(__("Operator '%s' must be used with a single value, not an array. Eg 'Registration.REG_ID => array('%s',23))",'event_espresso'),$operator,$operator));
3128
		}else{
3129
			throw new EE_Error(sprintf(__("It appears you've provided some totally invalid query parameters. Operator and value were:'%s', which isn't right at all", "event_espresso"),  http_build_query($op_and_value)));

core/EE_Registry.core.php 1 location

@@ 514-524 (lines=11) @@
511
			// get the file
512
			require_once( $path );
513
			// if the class isn't already declared somewhere
514
			if ( class_exists( $class_name, FALSE ) === FALSE ) {
515
				// so sorry, not a class
516
				throw new EE_Error(
517
					sprintf(
518
						__('The %s file %s does not appear to contain the %s Class.','event_espresso'),
519
						$type,
520
						$path,
521
						$class_name
522
					)
523
				);
524
			}
525
526
		} catch ( EE_Error $e ) {
527
			$e->get_error();