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