Code Duplication    Length = 5-5 lines in 2 locations

src/Parts/Insert.php 1 location

@@ 48-52 (lines=5) @@
45
    protected function set(array $values): string
46
    {
47
        $result = [];
48
        foreach ($values as $value) {
49
            $key = $this->uid('i');
50
            $result[] = ':' . $key;
51
            $this->placeholders()->set($key, $value);
52
        }
53
        return '(' . implode(',', $result) . ')';
54
    }
55

src/Parts/Update.php 1 location

@@ 26-30 (lines=5) @@
23
    public function set(array $values): string
24
    {
25
        $result = [];
26
        foreach ($values as $value) {
27
            $key = $this->uid('u');
28
            $result[] = ':' . $key;
29
            $this->placeholders()->set($key, $value);
30
        }
31
        return implode(',',
32
            array_map(function($field, $value) {
33
                return $field . ' = ' . $value;