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