| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | 3 | public function update($id, array $data) |
|
| 59 | { |
||
| 60 | 3 | $metadata = $this->metadata((string) get_class($this)); |
|
| 61 | |||
| 62 | 3 | $primary = $metadata->getSingleIdentifierColumnName(); |
|
| 63 | |||
| 64 | 3 | $this->db->where($primary, $id)->set((array) $data); |
|
| 65 | |||
| 66 | 3 | $result = $this->db->update($metadata->getTableName()); |
|
| 67 | |||
| 68 | 3 | $this->credo->refresh($this->find((integer) $id)); |
|
| 69 | |||
| 70 | 3 | return $result; |
|
| 71 | } |
||
| 84 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.