Code Duplication    Length = 8-8 lines in 3 locations

Query.php 3 locations

@@ 353-360 (lines=8) @@
350
     *
351
     * @return $this the query object itself
352
     */
353
    public function select($columns)
354
    {
355
        if (!is_array($columns)) {
356
            $columns = preg_split('/\s*,\s*/', trim($columns), -1, PREG_SPLIT_NO_EMPTY);
357
        }
358
        $this->select = $columns;
359
        return $this;
360
    }
361
362
    /**
363
     * Add more columns to the select part of the query.
@@ 405-412 (lines=8) @@
402
     *
403
     * @return $this the query object itself
404
     */
405
    public function from($nodes)
406
    {
407
        if (!is_array($nodes)) {
408
            $nodes = preg_split('/\s*,\s*/', trim($nodes), -1, PREG_SPLIT_NO_EMPTY);
409
        }
410
        $this->from = $nodes;
411
        return $this;
412
    }
413
414
    /**
415
     * Adds a filtering condition for a specific column and allow the user to choose a filter operator.
@@ 458-465 (lines=8) @@
455
     * @return $this the query object itself
456
     * @see addGroupBy()
457
     */
458
    public function groupBy($columns)
459
    {
460
        if (!is_array($columns)) {
461
            $columns = preg_split('/\s*,\s*/', trim($columns), -1, PREG_SPLIT_NO_EMPTY);
462
        }
463
        $this->groupBy = $columns;
464
        return $this;
465
    }
466
467
    /**
468
     * Adds additional group-by columns to the existing ones.