Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Uid | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Config; |
| 6 | |
| 7 | final class Uid |
| 8 | { |
| 9 | public function __construct( |
| 10 | private readonly \Cosray\Config $config, |
| 11 | ) {} |
| 12 | |
| 13 | /** @var non-empty-string */ |
| 14 | public string $alphabet { |
| 15 | get => $this->config->get('uid.alphabet'); |
| 16 | } |
| 17 | |
| 18 | /** @var positive-int */ |
| 19 | public int $length { |
| 20 | get => $this->config->get('uid.length'); |
| 21 | } |
| 22 | } |