Component   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 20
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A indentCsv() 0 5 1
A indent() 0 9 2
build() 0 1 ?
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Sql\Component;
5
6
abstract class Component
7
{
8 18
    public function indentCsv(array $list): string
9
    {
10 18
        return PHP_EOL . '    '
11 18
               . implode(',' . PHP_EOL . '    ', $list);
12
    }
13
14 18
    public function indent(array $list): string
15
    {
16 18
        if (empty($list)) {
17 15
            return '';
18
        }
19
20 15
        return PHP_EOL . '    '
21 15
               . implode(PHP_EOL . '    ', $list);
22
    }
23
24
    abstract public function build(): string;
25
}
26