Total Complexity | 6 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class TokenRepositoryConfig extends BaseObject implements TokenRepositoryConfigInterface, Configurable |
||
15 | { |
||
16 | public string $expirePeriodKey = 'TOKEN_EXPIRE_MINUTES'; |
||
17 | public string $verifyLimitKey = 'TOKEN_VERIFY_LIMIT'; |
||
18 | public string $deliveryLimitKey = 'TOKEN_DELIVERY_LIMIT'; |
||
19 | |||
20 | public int $defaultExpirePeriod = 30; |
||
21 | public int $defaultVerifyLimit = 3; |
||
22 | public int $defaultDeliveryLimit = 3; |
||
23 | |||
24 | public function getExpirePeriod(): CarbonInterval |
||
28 | } |
||
29 | |||
30 | 1 | public function getVerifyLimit(): int |
|
31 | { |
||
32 | 1 | return (int)getenv($this->verifyLimitKey) ?: $this->defaultVerifyLimit; |
|
33 | 1 | } |
|
34 | |||
35 | public function getDeliveryLimit(): int |
||
38 | } |
||
39 | } |
||
40 |