Code Duplication    Length = 12-12 lines in 2 locations

Query.php 2 locations

@@ 374-385 (lines=12) @@
371
     * @return $this the query object itself
372
     * @see select()
373
     */
374
    public function addSelect($columns)
375
    {
376
        if (!is_array($columns)) {
377
            $columns = preg_split('/\s*,\s*/', trim($columns), -1, PREG_SPLIT_NO_EMPTY);
378
        }
379
        if ($this->select === null) {
380
            $this->select = $columns;
381
        } else {
382
            $this->select = array_merge($this->select, $columns);
383
        }
384
        return $this;
385
    }
386
387
    /**
388
     * It sets the value indicating whether the search returns with Distinct or no filter
@@ 475-486 (lines=12) @@
472
     * @return $this the query object itself
473
     * @see groupBy()
474
     */
475
    public function addGroupBy($columns)
476
    {
477
        if (!is_array($columns)) {
478
            $columns = preg_split('/\s*,\s*/', trim($columns), -1, PREG_SPLIT_NO_EMPTY);
479
        }
480
        if ($this->groupBy === null) {
481
            $this->groupBy = $columns;
482
        } else {
483
            $this->groupBy = array_merge($this->groupBy, $columns);
484
        }
485
        return $this;
486
    }
487
488
    /**
489
     * Sets the HAVING part of the query.