Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function append($key, $default = '') |
||
35 | { |
||
36 | $data = $this->offsetGet($key); |
||
37 | if (is_array($data)) { |
||
38 | $this->offsetSet($key, array_merge($data, $default)); |
||
39 | } |
||
40 | elseif (is_numeric($data)) { |
||
41 | $this->offsetSet($key, $data + $default); |
||
42 | } |
||
43 | elseif (is_scalar($data)) { |
||
44 | $this->offsetSet($key, $data . $default); |
||
45 | } |
||
46 | return $this; |
||
47 | } |
||
48 | } |
||
49 |