Cube   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 18
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getGroupByPart() 0 3 1
1
<?php
2
3
namespace Xsolve\SalesforceClient\QueryBuilder\Expr\GroupBy;
4
5
use Xsolve\SalesforceClient\QueryBuilder\Expr\ExprInterface;
6
7
class Cube extends AbstractGroupBy implements ExprInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $fields;
13
14 1
    public function __construct(array $fields)
15
    {
16 1
        $this->fields = $fields;
17 1
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22 1
    protected function getGroupByPart(): string
23
    {
24 1
        return sprintf('CUBE(%s)', implode(', ', $this->fields));
25
    }
26
}
27