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