Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class DummyAggregateRootId implements AggregateRootId |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $identifier; |
||
14 | |||
15 | 13 | private function __construct(string $identifier) |
|
16 | { |
||
17 | 13 | $this->identifier = $identifier; |
|
18 | 13 | } |
|
19 | |||
20 | /** |
||
21 | * @return string |
||
22 | */ |
||
23 | 6 | public function toString(): string |
|
24 | { |
||
25 | 6 | return $this->identifier; |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param string $aggregateRootId |
||
30 | * |
||
31 | * @return static |
||
32 | */ |
||
33 | 8 | public static function fromString(string $aggregateRootId): AggregateRootId |
|
36 | } |
||
37 | |||
38 | 10 | public static function generate(): AggregateRootId |
|
43 |