Code Duplication    Length = 11-15 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

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

core/EE_Registry.core.php 1 location

@@ 702-712 (lines=11) @@
699
			// get the file
700
			require_once( $path );
701
			// if the class isn't already declared somewhere
702
			if ( class_exists( $class_name, false ) === false ) {
703
				// so sorry, not a class
704
				throw new EE_Error(
705
					sprintf(
706
						__( 'The %s file %s does not appear to contain the %s Class.', 'event_espresso' ),
707
						$type,
708
						$path,
709
						$class_name
710
					)
711
				);
712
			}
713
714
		} catch ( EE_Error $e ) {
715
			$e->get_error();