Code Duplication    Length = 11-15 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 4103-4117 (lines=15) @@
4100
            }
4101
            $cleaned_value = $this->_construct_between_value($value, $field_obj);
4102
            return $operator . SP . $cleaned_value;
4103
        } elseif (in_array($operator, $this->_null_style_operators)) {
4104
            if ($value !== null) {
4105
                throw new EE_Error(
4106
                    sprintf(
4107
                        __(
4108
                            "You attempted to give a value  (%s) while using a NULL-style operator (%s). That isn't valid",
4109
                            "event_espresso"
4110
                        ),
4111
                        $value,
4112
                        $operator
4113
                    )
4114
                );
4115
            }
4116
            return $operator;
4117
        } elseif ($operator === 'LIKE' && ! is_array($value)) {
4118
            //if the operator is 'LIKE', we want to allow percent signs (%) and not
4119
            //remove other junk. So just treat it as a string.
4120
            return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s');
@@ 4123-4134 (lines=12) @@
4120
            return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s');
4121
        } elseif (! in_array($operator, $this->_in_style_operators) && ! is_array($value)) {
4122
            return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj);
4123
        } elseif (in_array($operator, $this->_in_style_operators) && ! is_array($value)) {
4124
            throw new EE_Error(
4125
                sprintf(
4126
                    __(
4127
                        "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))",
4128
                        'event_espresso'
4129
                    ),
4130
                    $operator,
4131
                    $operator
4132
                )
4133
            );
4134
        } elseif (! in_array($operator, $this->_in_style_operators) && is_array($value)) {
4135
            throw new EE_Error(
4136
                sprintf(
4137
                    __(

core/EE_Registry.core.php 1 location

@@ 879-889 (lines=11) @@
876
            // get the file
877
            require_once($path);
878
            // if the class isn't already declared somewhere
879
            if (class_exists($class_name, false) === false) {
880
                // so sorry, not a class
881
                throw new EE_Error(
882
                    sprintf(
883
                        __('The %s file %s does not appear to contain the %s Class.', 'event_espresso'),
884
                        $type,
885
                        $path,
886
                        $class_name
887
                    )
888
                );
889
            }
890
        } catch (EE_Error $e) {
891
            $e->get_error();
892
            return false;