Code Duplication    Length = 10-10 lines in 3 locations

src/Query/Traits/Where.php 2 locations

@@ 21-30 (lines=10) @@
18
     *
19
     * @return self
20
     */
21
    public function where($field, $condition = false, $operator = '=')
22
    {
23
        if (func_num_args() >= 2) {
24
            $this->where->addCondition($field, $condition, $operator);
25
        } else {
26
            $this->where->addCondition($field);
27
        }
28
29
        return $this;
30
    }
31
32
    /**
33
     * Adds a where or condition to the query.
@@ 41-50 (lines=10) @@
38
     *
39
     * @return self
40
     */
41
    public function orWhere($field, $condition = false, $operator = '=')
42
    {
43
        if (func_num_args() >= 2) {
44
            $this->where->addOrCondition($field, $condition, $operator);
45
        } else {
46
            $this->where->addOrCondition($field);
47
        }
48
49
        return $this;
50
    }
51
52
    /**
53
     * Sets the where conditions for the query with infix style arguments.

src/Query/SelectQuery.php 1 location

@@ 198-207 (lines=10) @@
195
     *
196
     * @return self
197
     */
198
    public function having($field, $condition = false, $operator = '=')
199
    {
200
        if (func_num_args() >= 2) {
201
            $this->having->addCondition($field, $condition, $operator);
202
        } else {
203
            $this->having->addCondition($field);
204
        }
205
206
        return $this;
207
    }
208
209
    /**
210
     * Unions another select query with this query.