GroupBy::groupBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Sql\Clause;
5
6
use Sirius\Sql\Component\By;
7
8
trait GroupBy
9
{
10
    /**
11
     * @var By
12
     */
13
    protected $groupBy;
14
15 17
    public function resetGroupBy()
16
    {
17 17
        $this->groupBy = new By('GROUP');
18
19 17
        return $this;
20
    }
21
22 2
    public function groupBy(string $expr, string ...$exprs)
23
    {
24 2
        $this->groupBy->expr($expr, ...$exprs);
25
26 2
        return $this;
27
    }
28
}
29