| 1 | <?php declare(strict_types = 1); |
||
| 7 | final class Id |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var int |
||
| 11 | */ |
||
| 12 | private $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param int $id |
||
| 16 | */ |
||
| 17 | private function __construct(int $id) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param int $id |
||
| 25 | * @return Id |
||
| 26 | */ |
||
| 27 | public static function fromInteger(int $id): Id |
||
| 31 | |||
| 32 | public function id() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function __toString() |
||
| 44 | } |
||
| 45 |