Component::build()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
nc 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