This commit is contained in:
Dominik Liebler
2021-04-12 14:04:45 +02:00
parent 5c5d453506
commit 4678b5d86f
50 changed files with 992 additions and 1430 deletions

View File

@@ -13,8 +13,6 @@ use InvalidArgumentException;
*/
class PostId
{
private int $id;
public static function fromInt(int $id): PostId
{
self::ensureIsValid($id);
@@ -22,9 +20,8 @@ class PostId
return new self($id);
}
private function __construct(int $id)
private function __construct(private int $id)
{
$this->id = $id;
}
public function toInt(): int