Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | class SafeStoreSecret |
||
26 | { |
||
27 | private readonly string $secret; |
||
28 | |||
29 | /** |
||
30 | * Length of the secret |
||
31 | */ |
||
32 | private const LENGTH = 12; |
||
33 | |||
34 | public function __construct() |
||
35 | { |
||
36 | $this->secret = OtpGenerator::generate(self::LENGTH); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * The output format, %s-%s-%s results in something like: |
||
41 | * 3K1A-5CQ9-YCPE |
||
42 | */ |
||
43 | public function display(): string |
||
47 | } |
||
48 | } |
||
49 |