GroupConverter::convert()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 9.9
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 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