Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
49 | 2 | public function toSql() |
|
50 | { |
||
51 | 2 | $parts = ['UPDATE `' . $this->table . '`']; |
|
52 | 2 | if (count($this->attributes)) { |
|
53 | 2 | $columns = array_keys($this->attributes); |
|
54 | 2 | $parts[] = "SET " . Helper::arrayImplode(', ', $columns, "`", "` = ?"); |
|
55 | } |
||
56 | 2 | if ($part = parent::toSql()) { |
|
57 | 2 | $parts[] = $part; |
|
58 | } |
||
59 | 2 | return implode(' ', $parts); |
|
60 | } |
||
61 | |||
70 |