| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class RateLimitException extends BaseException implements SeamsCMSException |
||
| 17 | { |
||
| 18 | /** @var int */ |
||
| 19 | protected $limit; |
||
| 20 | |||
| 21 | /** @var int */ |
||
| 22 | protected $resetTimestamp; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * RateLimitException constructor. |
||
| 26 | * |
||
| 27 | * @param int $limit |
||
| 28 | * @param int $resetTimestamp |
||
| 29 | * @param string $msg |
||
| 30 | */ |
||
| 31 | 1 | public function __construct(int $limit, int $resetTimestamp, string $msg) |
|
| 32 | { |
||
| 33 | 1 | $this->limit = $limit; |
|
| 34 | 1 | $this->resetTimestamp = $resetTimestamp; |
|
| 35 | |||
| 36 | 1 | parent::__construct($msg); |
|
| 37 | 1 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @return int |
||
| 41 | */ |
||
| 42 | 1 | public function getLimit(): int |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | 1 | public function getResetTimestamp(): int |
|
| 53 | } |
||
| 54 | } |
||
| 55 |