| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class DummyAggregateRootId implements AggregateRootId |
||
| 8 | { |
||
| 9 | private string $identifier; |
||
| 10 | |||
| 11 | public function __construct(string $identifier) |
||
| 12 | { |
||
| 13 | $this->identifier = $identifier; |
||
| 14 | } |
||
| 15 | |||
| 16 | public function toString(): string |
||
| 19 | } |
||
| 20 | |||
| 21 | public static function generate(): DummyAggregateRootId |
||
| 22 | { |
||
| 23 | return new DummyAggregateRootId(bin2hex(random_bytes(25))); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return static |
||
| 28 | */ |
||
| 29 | public static function fromString(string $aggregateRootId): AggregateRootId |
||
| 32 | } |
||
| 33 | } |
||
| 34 |