| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function add($var, $type, $value = false) |
||
| 20 | { |
||
| 21 | if (!is_array($this->next[$var][$type])) { |
||
| 22 | $this->next[$var][$type] = [$value]; |
||
| 23 | } else { |
||
| 24 | if (is_array($value)) { |
||
| 25 | $this->next[$var][$type] = [$this->next[$var][$type], $value]; |
||
| 26 | } else { |
||
| 27 | $this->next[$var][$type][] = $value; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->write(); |
||
| 32 | return $this; |
||
| 33 | } |
||
| 34 | } |
||
| 35 |