GroupBy::buildGroupBy()   A
last analyzed

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
declare(strict_types = 1);
4
5
namespace Puzzle\QueryBuilder\Queries\Snippets\Builders;
6
7
trait GroupBy
8
{
9
    protected
10
        $groupBy;
1 ignored issue
show
Coding Style introduced by
The visibility should be declared for property $groupBy.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
11
12 1
    public function groupBy(?string $column): self
13
    {
14 1
        $this->groupBy->addGroupBy($column);
15
16 1
        return $this;
17
    }
18
19 19
    private function buildGroupBy(): string
20
    {
21 19
        return $this->groupBy->toString();
22
    }
23
}
24