$metadata */ public function __construct( public readonly string $type, public readonly ?int $ageFrom = null, public readonly ?int $ageTo = null, public readonly ?int $birthYearFrom = null, public readonly ?int $birthYearTo = null, public readonly array $metadata = [], public readonly ?string $rawData = null, ) { } public function hasAgeConstraints(): bool { return null !== $this->ageFrom || null !== $this->ageTo; } public function hasBirthYearConstraints(): bool { return null !== $this->birthYearFrom || null !== $this->birthYearTo; } public function isEmpty(): bool { return false === $this->hasAgeConstraints() && false === $this->hasBirthYearConstraints(); } }