UpdateColumns   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 10 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Sql\Component;
5
6
class UpdateColumns extends ModifyColumns
7
{
8 1
    public function build(): string
9
    {
10 1
        $values = array();
11 1
        foreach ($this->list as $column => $value) {
12 1
            $quotedColumn = $this->quoter->quoteIdentifier($column);
13 1
            $values[]     = "{$quotedColumn} = {$value}";
14
        }
15
16 1
        return PHP_EOL . 'SET' . $this->indentCsv($values);
17
    }
18
}
19