Total Complexity | 7 |
Total Lines | 74 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class APIUsageObject |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $current; |
||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $available; |
||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $refreshAfter; |
||
25 | |||
26 | /** |
||
27 | * APIUsageObject constructor. |
||
28 | * @param int $current |
||
29 | * @param int $available |
||
30 | * @param int $refreshAfter |
||
31 | */ |
||
32 | 3 | public function __construct(int $current, int $available, int $refreshAfter) |
|
33 | { |
||
34 | 3 | $this->setCurrent($current); |
|
35 | 3 | $this->setAvailable($available); |
|
36 | 3 | $this->setRefreshAfter($refreshAfter); |
|
37 | 3 | } |
|
38 | |||
39 | /** |
||
40 | * @return int |
||
41 | */ |
||
42 | 3 | public function getCurrent(): int |
|
43 | { |
||
44 | 3 | return $this->current; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param int $current |
||
49 | */ |
||
50 | 3 | public function setCurrent(int $current) |
|
53 | 3 | } |
|
54 | |||
55 | /** |
||
56 | * @return int |
||
57 | */ |
||
58 | 3 | public function getAvailable(): int |
|
59 | { |
||
60 | 3 | return $this->available; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param int $available |
||
65 | */ |
||
66 | 3 | public function setAvailable(int $available) |
|
69 | 3 | } |
|
70 | |||
71 | /** |
||
72 | * @return int |
||
73 | */ |
||
74 | 3 | public function getRefreshAfter(): int |
|
75 | { |
||
76 | 3 | return $this->refreshAfter; |
|
77 | } |
||
78 | |||
79 | /** |
||
80 | * @param int $refreshAfter |
||
81 | */ |
||
82 | 3 | public function setRefreshAfter(int $refreshAfter) |
|
85 | 3 | } |
|
86 | } |
||
87 |