Code Duplication    Length = 11-15 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

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

core/EE_Registry.core.php 1 location

@@ 841-851 (lines=11) @@
838
            // get the file
839
            require_once($path);
840
            // if the class isn't already declared somewhere
841
            if (class_exists($class_name, false) === false) {
842
                // so sorry, not a class
843
                throw new EE_Error(
844
                    sprintf(
845
                        __('The %s file %s does not appear to contain the %s Class.', 'event_espresso'),
846
                        $type,
847
                        $path,
848
                        $class_name
849
                    )
850
                );
851
            }
852
        } catch (EE_Error $e) {
853
            $e->get_error();
854
            return false;