Code Duplication    Length = 11-15 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3524-3538 (lines=15) @@
3521
			}
3522
			$cleaned_value = $this->_construct_between_value( $value, $field_obj );
3523
			return $operator . SP . $cleaned_value;
3524
		} elseif ( in_array( $operator, $this->_null_style_operators ) ) {
3525
			if ( $value !== null ) {
3526
				throw new EE_Error(
3527
					sprintf(
3528
						__(
3529
							"You attempted to give a value  (%s) while using a NULL-style operator (%s). That isn't valid",
3530
							"event_espresso"
3531
						),
3532
						$value,
3533
						$operator
3534
					)
3535
				);
3536
			}
3537
			return $operator;
3538
		} elseif ( $operator === 'LIKE' && ! is_array( $value ) ) {
3539
			//if the operator is 'LIKE', we want to allow percent signs (%) and not
3540
			//remove other junk. So just treat it as a string.
3541
			return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' );
@@ 3544-3555 (lines=12) @@
3541
			return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' );
3542
		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) {
3543
			return $operator . SP . $this->_wpdb_prepare_using_field( $value, $field_obj );
3544
		} elseif ( in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) {
3545
			throw new EE_Error(
3546
				sprintf(
3547
					__(
3548
						"Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))",
3549
						'event_espresso'
3550
					),
3551
					$operator,
3552
					$operator
3553
				)
3554
			);
3555
		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && is_array( $value ) ) {
3556
			throw new EE_Error(
3557
				sprintf(
3558
					__(

core/EE_Registry.core.php 1 location

@@ 773-783 (lines=11) @@
770
			// get the file
771
			require_once( $path );
772
			// if the class isn't already declared somewhere
773
			if ( class_exists( $class_name, false ) === false ) {
774
				// so sorry, not a class
775
				throw new EE_Error(
776
					sprintf(
777
						__( 'The %s file %s does not appear to contain the %s Class.', 'event_espresso' ),
778
						$type,
779
						$path,
780
						$class_name
781
					)
782
				);
783
			}
784
785
		} catch ( EE_Error $e ) {
786
			$e->get_error();