| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function set(string $key, $value) |
||
| 31 | { |
||
| 32 | $contents = $this->get($key) ?: []; |
||
| 33 | |||
| 34 | if (\is_array($value)) { |
||
| 35 | $contents = $value + $contents; |
||
| 36 | } else { |
||
| 37 | array_push($contents, $value); |
||
| 38 | } |
||
| 39 | |||
| 40 | return apcu_store($this->getActualCacheKey($key), $contents, $this->getTtl()); |
||
| 41 | } |
||
| 78 |