@@ -58,7 +58,7 @@ |
||
58 | 58 | { |
59 | 59 | $current = time(); |
60 | 60 | |
61 | - $this->ttlKeys = array_filter ($this->ttlKeys, function (int $time, string $key) use ($current) { |
|
61 | + $this->ttlKeys = array_filter($this->ttlKeys, function(int $time, string $key) use ($current) { |
|
62 | 62 | $isExpired = $time < $current; |
63 | 63 | if ($isExpired) { |
64 | 64 | unset($this->store[$key]); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function get(string $key): int |
20 | 20 | { |
21 | - return (int)$this->redis->get($key); |
|
21 | + return (int) $this->redis->get($key); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function inc(string $key, int $ttl = 60): int |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function reset(string $key): bool |
35 | 35 | { |
36 | - return (bool)$this->redis->del($key); |
|
36 | + return (bool) $this->redis->del($key); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function isExceeded(string $key, int $max): bool |