Skip to content

Commit

Permalink
Simplify the Serializer feature
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Nov 12, 2023
1 parent 43273df commit 16da657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ private function getTypeCasting(Cell $cell, ReflectionProperty|ReflectionMethod
return $cast;
}

if (!$type instanceof ReflectionNamedType) {
if (null === $type) {
throw new MappingFailed(match (true) {
$accessor instanceof ReflectionMethod => 'The setter method argument `'.$accessor->getParameters()[0]->getName().'` must be typed.',
$accessor instanceof ReflectionProperty => 'The property `'.$accessor->getName().'` must be typed.',
Expand Down

0 comments on commit 16da657

Please sign in to comment.