| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 5 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 30 | 5 | protected function updateCounter(string $valueKey, string $timeKey, int $interval): int  | 
            |
| 31 |     { | 
            ||
| 32 | 5 | $current = $this->memcached->increment($valueKey, 1, 1, $interval);  | 
            |
| 33 | |||
| 34 | 5 |         if ($current === 1) { | 
            |
| 35 | 5 | $this->memcached->add($timeKey, \time(), $interval);  | 
            |
| 36 | }  | 
            ||
| 37 | |||
| 38 | 5 | return $current === false ? 1 : $current;  | 
            |
| 39 | }  | 
            ||
| 40 | |||
| 46 |