Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
54 | 9 | public function set(QueryInterface $query) |
|
55 | { |
||
56 | 9 | $query = $query->update($this->table); |
|
57 | |||
58 | 9 | foreach ($this->data as $key => $value) |
|
59 | { |
||
60 | 9 | if ($this->primary === $key) |
|
61 | 6 | { |
|
62 | 6 | continue; |
|
63 | } |
||
64 | |||
65 | 9 | $query = $query->set($key, $value); |
|
66 | 6 | } |
|
67 | |||
68 | 9 | $query = $query->where($this->primary); |
|
69 | |||
70 | 9 | return $query->equals((integer) $this->id); |
|
71 | } |
||
73 |