| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class RedisMetricsHandler implements MetricsHandlerInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var AsynchronousClient |
||
| 15 | */ |
||
| 16 | private AsynchronousClient $client; |
||
| 17 | |||
| 18 | public function __construct(AsynchronousClient $client) |
||
| 19 | { |
||
| 20 | $this->client = $client; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function resetUsers(string $localAddress): PromiseInterface |
||
| 24 | { |
||
| 25 | /** @phpstan-ignore-next-line */ |
||
| 26 | return $this->client->set('users:' . $localAddress, 0); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function incrementUsers(string $localAddress): PromiseInterface |
||
| 33 | } |
||
| 34 | |||
| 35 | public function decrementUsers(string $localAddress): PromiseInterface |
||
| 39 | } |
||
| 40 | |||
| 41 | public function getNbUsers(): PromiseInterface |
||
| 57 |