Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | final class RedisMutexFactory extends MutexFactory |
||
15 | { |
||
16 | private ClientInterface $client; |
||
17 | private int $ttl; |
||
18 | |||
19 | /** |
||
20 | * @param ClientInterface $client Predis client instance to use. |
||
21 | * @param int $ttl Number of seconds in which the lock will be auto released. |
||
22 | */ |
||
23 | 1 | public function __construct(ClientInterface $client, int $ttl = 30) |
|
27 | } |
||
28 | |||
29 | 1 | public function create(string $name): MutexInterface |
|
34 |