Skip to content

Commit

Permalink
refactor: change how exception is raised
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Rafael Azevedo committed Mar 23, 2022
1 parent 5ebcd83 commit f7a20ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Attributes/Personal/HasGenderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f7a20ff

Please sign in to comment.