for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types = 1);
namespace Link0\Bunq\Domain;
use Assert\Assertion;
final class Id
{
/**
* @var int
*/
private $id;
* @param int $id
private function __construct(int $id)
Assertion::greaterOrEqualThan($id, 0, 'Id must be greater or equal to 0');
$this->id = $id;
}
* @return Id
public static function fromInteger(int $id): Id
return new Id($id);
public function id()
return $this->id;
* @return string
public function __toString()
return (string) $this->id();