GroupConverter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 14
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 11 2
1
<?php
2
3
namespace BigShark\SQLToBuilder\Converter;
4
5
class GroupConverter extends Converter implements ConverterInterface
6
{
7 12
    public function convert($group)
8
    {
9 12
        $result = [];
10 12
        foreach ($group as $item) {
11 9
            $args = [];
12 9
            $args[] = $this->getValueWithoutQuotes($item, 'base_expr');
13 9
            $result[] = $this->format('groupBy', $args);
14
        }
15
16 12
        return $result;
17
    }
18
}
19