| 1 | <?php |
||
| 9 | class Status |
||
| 10 | { |
||
| 11 | /** @var string */ |
||
| 12 | protected $identifier; |
||
| 13 | |||
| 14 | /** @var bool */ |
||
| 15 | protected $success; |
||
| 16 | |||
| 17 | /** @var int */ |
||
| 18 | protected $limit; |
||
| 19 | |||
| 20 | /** @var int */ |
||
| 21 | protected $remainingAttempts; |
||
| 22 | |||
| 23 | 10 | /** @var DateTimeImmutable */ |
|
| 24 | protected $resetAt; |
||
| 25 | 10 | ||
| 26 | 10 | final protected function __construct(string $identifier, bool $success, int $limit, int $remainingAttempts, DateTimeImmutable $resetAt) |
|
| 34 | |||
| 35 | public static function from(string $identifier, int $current, int $limit, DateTimeImmutable $resetAt) |
||
| 39 | |||
| 40 | public function getIdentifier(): string |
||
| 44 | |||
| 45 | public function limitExceeded(): bool |
||
| 49 | |||
| 50 | public function getLimit(): int |
||
| 54 | |||
| 55 | public function getRemainingAttempts(): int |
||
| 59 | |||
| 60 | public function getResetAt(): DateTimeImmutable |
||
| 64 | } |
||
| 65 |