Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | class RecoveryTokenConfig |
||
26 | { |
||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $smsEnabled; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $safeStoreCodeEnabled; |
||
36 | |||
37 | public function __construct(bool $smsEnabled, bool $safeStoreCodeEnabled) |
||
38 | { |
||
39 | if ($smsEnabled === false && $safeStoreCodeEnabled === false) { |
||
40 | throw new RecoveryTokenConfigurationException('The SMS or safe-store code recovery token must be enabled'); |
||
41 | } |
||
42 | $this->smsEnabled = $smsEnabled; |
||
43 | $this->safeStoreCodeEnabled = $safeStoreCodeEnabled; |
||
44 | } |
||
45 | |||
46 | public function isSmsDisabled(): bool |
||
49 | } |
||
50 | |||
51 | public function isSafeStoreCodeDisabled(): bool |
||
54 | } |
||
55 | } |
||
56 |