Code Duplication    Length = 12-13 lines in 2 locations

src/Query/AbstractQuery.php 2 locations

@@ 167-179 (lines=13) @@
164
     * @param array $values
165
     * @return $this
166
     */
167
    public function where($string, $values = [])
168
    {
169
        /** @var Condition $this ->_parts[] */
170
        if ($string) {
171
            if (isset($this->parts['where']) && $this->parts['where'] instanceof Condition) {
172
                $this->parts['where'] = $this->parts['where']->and_($this->getCondition($string, $values));
173
            } else {
174
                $this->parts['where'] = $this->getCondition($string, $values);
175
            }
176
        }
177
178
        return $this;
179
    }
180
181
    /**
182
     * @param string $string
@@ 260-271 (lines=12) @@
257
     *
258
     * @return $this
259
     */
260
    public function orWhere($string, $values = [])
261
    {
262
        if ($string) {
263
            if ($this->parts['where'] instanceof Condition) {
264
                $this->parts['where'] = $this->parts['where']->or_($this->getCondition($string, $values));
265
            } else {
266
                $this->parts['where'] = $this->getCondition($string, $values);
267
            }
268
        }
269
270
        return $this;
271
    }
272
273
    /**
274
     * @param $string