Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
58 | 2 | public function update($id, array $data) |
|
59 | { |
||
60 | 2 | $metadata = $this->metadata((string) get_class($this)); |
|
61 | |||
62 | 2 | $primary = $metadata->getSingleIdentifierColumnName(); |
|
63 | |||
64 | 2 | $this->db->where($primary, $id)->set((array) $data); |
|
65 | |||
66 | 2 | $result = $this->db->update($metadata->getTableName()); |
|
67 | |||
68 | 2 | $this->credo->refresh($this->find((integer) $id)); |
|
69 | |||
70 | 2 | return $result; |
|
71 | } |
||
84 |