| 1 | <?php |
||
| 9 | class Status |
||
| 10 | { |
||
| 11 | /** @var string */ |
||
| 12 | protected $identifier; |
||
| 13 | |||
| 14 | /** @var int */ |
||
| 15 | protected $current; |
||
| 16 | |||
| 17 | /** @var QuotaPolicy */ |
||
| 18 | protected $quotaPolicy; |
||
| 19 | |||
| 20 | /** @var DateTimeImmutable */ |
||
| 21 | protected $resetAt; |
||
| 22 | |||
| 23 | final protected function __construct(string $identifier, int $current, QuotaPolicy $quotaPolicy, DateTimeImmutable $resetAt) |
||
| 30 | |||
| 31 | public static function from(string $identifier, int $current, QuotaPolicy $quotaPolicy, DateTimeImmutable $resetAt) |
||
| 35 | |||
| 36 | public function getIdentifier(): string |
||
| 40 | |||
| 41 | public function getCurrent(): int |
||
| 45 | |||
| 46 | public function getQuota(): int |
||
| 50 | |||
| 51 | public function getResetAt(): DateTimeImmutable |
||
| 55 | |||
| 56 | public function quotaExceeded(): bool |
||
| 60 | |||
| 61 | public function getRemainingAttempts(): int |
||
| 65 | } |
||
| 66 |