| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 11 |
| Ratio | 100 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 2 | View Code Duplication | public function set($key, $value) |
| 34 | { |
||
| 35 | 2 | $pipeline = $this->getRedis()->pipeline(['fire-and-forget' => true]); |
|
| 36 | 2 | if ($value) { |
|
| 37 | 1 | $pipeline->hset(self::KEY, $key, $value); |
|
| 38 | } else { |
||
| 39 | 1 | $pipeline->zrem(self::KEY, $key); |
|
| 40 | } |
||
| 41 | |||
| 42 | 2 | $pipeline->execute(); |
|
| 43 | 2 | } |
|
| 44 | |||
| 62 |