Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | 2 | public function insert(array $data) |
|
39 | { |
||
40 | 2 | $metadata = $this->metadata((string) get_class($this)); |
|
41 | |||
42 | 2 | $this->db->insert($metadata->getTableName(), $data); |
|
|
|||
43 | |||
44 | 2 | $item = $this->find($lastId = $this->db->insert_id()); |
|
45 | |||
46 | 2 | $this->credo->refresh($item); |
|
47 | |||
48 | 2 | return $lastId; |
|
49 | } |
||
84 |