Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | final class RateLimit |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $key; |
||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $limit; |
||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $milliseconds; |
||
21 | |||
22 | 3 | public function __construct(string $key, int $limit, int $milliseconds) |
|
27 | 3 | } |
|
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | 2 | public function getKey(): string |
|
33 | { |
||
34 | 2 | return $this->key; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return int |
||
39 | */ |
||
40 | 2 | public function getLimit(): int |
|
41 | { |
||
42 | 2 | return $this->limit; |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return int |
||
47 | */ |
||
48 | 2 | public function getMilliseconds(): int |
|
51 | } |
||
52 | } |
||
53 |