| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 9 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 53 | public function saveCounter(string $storageKey, Counter $counter, float $ttl = null) | ||
| 54 |     { | ||
| 55 | $item = $this->cacheItemPool->getItem($storageKey); | ||
| 56 | $item->set(serialize($counter)); | ||
| 57 |         if (null !== $ttl) { | ||
| 58 | $item->expiresAfter((int) ceil($ttl)); | ||
| 59 | } | ||
| 60 | $this->cacheItemPool->save($item); | ||
| 61 | } | ||
| 62 | |||
| 71 |