1 | <?php declare(strict_types=1); |
||
5 | final class RateLimitState |
||
6 | { |
||
7 | /** |
||
8 | * @var int |
||
9 | */ |
||
10 | private $limit = 0; |
||
11 | |||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | private $remaining = 0; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $reset = 0; |
||
21 | |||
22 | /** |
||
23 | * @return int |
||
24 | */ |
||
25 | 2 | public function getLimit(): int |
|
29 | |||
30 | /** |
||
31 | * @param int $limit |
||
32 | */ |
||
33 | 2 | public function setLimit(int $limit) |
|
37 | |||
38 | /** |
||
39 | * @return int |
||
40 | */ |
||
41 | 2 | public function getRemaining(): int |
|
45 | |||
46 | /** |
||
47 | * @param int $remaining |
||
48 | */ |
||
49 | 2 | public function setRemaining(int $remaining) |
|
53 | |||
54 | /** |
||
55 | * @return int |
||
56 | */ |
||
57 | 2 | public function getReset(): int |
|
61 | |||
62 | /** |
||
63 | * @param int $reset |
||
64 | */ |
||
65 | 2 | public function setReset(int $reset) |
|
69 | } |
||
70 |