Completed
Push — master ( b54f87...bde51f )
by Beniamin
04:50
created

GroupByClauseTrait::getGroupByClauses()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of Phuria SQL Builder package.
5
 *
6
 * Copyright (c) 2016 Beniamin Jonatan Šimko
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Phuria\SQLBuilder\QueryBuilder\Clause;
13
14
/**
15
 * @author Beniamin Jonatan Šimko <[email protected]>
16
 */
17
trait GroupByClauseTrait
18
{
19
    /**
20
     * @var array $groupByClauses
21
     */
22
    private $groupByClauses = [];
23
24
    /**
25
     * @param string $clause
26
     *
27
     * @return $this
28
     */
29 3
    public function addGroupBy($clause)
30
    {
31 3
        $this->groupByClauses[] = $clause;
32
33 3
        return $this;
34
    }
35
36
    /**
37
     * @return array
38
     */
39 22
    public function getGroupByClauses()
40
    {
41 22
        return $this->groupByClauses;
42
    }
43
}