diff --git a/src/Attributes/Personal/HasGenderTrait.php b/src/Attributes/Personal/HasGenderTrait.php index 2fe3e17..4e21023 100644 --- a/src/Attributes/Personal/HasGenderTrait.php +++ b/src/Attributes/Personal/HasGenderTrait.php @@ -35,7 +35,7 @@ protected function castGender(string $gender): void $genderValue->equals('Female') || $genderValue->equals('Other') )) { - throw new UnexpectedEntityValueException('$gender'); + throw UnexpectedEntityValueException::withName('$gender'); } $this->gender = $genderValue;