| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | final class Id |
||
| 19 | { |
||
| 20 | /** @var int */ |
||
| 21 | private $id; |
||
| 22 | |||
| 23 | private function __construct(int $id) |
||
| 24 | { |
||
| 25 | $this->id = $id; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function __toString(): string |
||
| 29 | { |
||
| 30 | return (string) $this->id; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function toInt(): int |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getId(): int |
||
| 41 | } |
||
| 42 | |||
| 43 | public static function fromInt(int $id): self |
||
| 48 |