Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function save() |
||
21 | { |
||
22 | if (!$this->id) { |
||
23 | $max = 0; |
||
24 | if (count($this->_test->data[$this->_key])) { |
||
25 | $max = max(array_keys($this->_test->data[$this->_key])); |
||
26 | } |
||
27 | $this->id = $max + 1; |
||
28 | } |
||
29 | $this->_test->data[$this->_key][$this->id] = $this; |
||
30 | return $this; |
||
31 | } |
||
32 | } |
||
33 |