Code Duplication    Length = 10-10 lines in 4 locations

src/Query/DeleteQuery.php 1 location

@@ 74-83 (lines=10) @@
71
     *
72
     * @return self
73
     */
74
    public function where($field, $condition = false, $operator = '=')
75
    {
76
        if (func_num_args() >= 2) {
77
            $this->where->addCondition($field, $condition, $operator);
78
        } else {
79
            $this->where->addCondition($field);
80
        }
81
82
        return $this;
83
    }
84
85
    /**
86
     * Sets the limit for the query.

src/Query/UpdateQuery.php 1 location

@@ 81-90 (lines=10) @@
78
     *
79
     * @return self
80
     */
81
    public function where($field, $condition = false, $operator = '=')
82
    {
83
        if (func_num_args() >= 2) {
84
            $this->where->addCondition($field, $condition, $operator);
85
        } else {
86
            $this->where->addCondition($field);
87
        }
88
89
        return $this;
90
    }
91
92
    /**
93
     * Sets the values for the query.

src/Query/SelectQuery.php 2 locations

@@ 132-141 (lines=10) @@
129
     *
130
     * @return self
131
     */
132
    public function where($field, $condition = false, $operator = '=')
133
    {
134
        if (func_num_args() >= 2) {
135
            $this->where->addCondition($field, $condition, $operator);
136
        } else {
137
            $this->where->addCondition($field);
138
        }
139
140
        return $this;
141
    }
142
143
    /**
144
     * Adds a where between condition to the query.
@@ 214-223 (lines=10) @@
211
     *
212
     * @return self
213
     */
214
    public function having($field, $condition = false, $operator = '=')
215
    {
216
        if (func_num_args() >= 2) {
217
            $this->having->addCondition($field, $condition, $operator);
218
        } else {
219
            $this->having->addCondition($field);
220
        }
221
222
        return $this;
223
    }
224
225
    /**
226
     * Sets the order for the query.