Total Complexity | 3 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class LightSwitchId implements AggregateRootId |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $id; |
||
15 | |||
16 | 5 | public function __construct(string $id) |
|
17 | { |
||
18 | 5 | $this->id = $id; |
|
19 | 5 | } |
|
20 | |||
21 | 4 | public function toString(): string |
|
22 | { |
||
23 | 4 | return $this->id; |
|
24 | } |
||
25 | |||
26 | 5 | public static function fromString(string $aggregateRootId): AggregateRootId |
|
29 | } |
||
30 | } |
||
31 |