Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class DeviceIdGenerator |
||
10 | { |
||
11 | private int $length; |
||
12 | private bool $lowercased; |
||
13 | private IdStrategyInterface $strategy; |
||
14 | |||
15 | public function __construct(?IdStrategyInterface $strategy = null, int $length = 21, bool $lowercased = true) |
||
16 | { |
||
17 | $this->length = $length; |
||
18 | $this->lowercased = $lowercased; |
||
19 | $this->strategy = $strategy ?? new PlatformIdStrategy(); |
||
20 | } |
||
21 | |||
22 | public function generate(): string |
||
34 | } |
||
35 | } |
||
36 |