Skip to content

Commit

Permalink
Fix property setter condition
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Nov 16, 2023
1 parent c48de61 commit 456cd16
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Denormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,7 @@ private function findPropertySetter(ReflectionProperty|ReflectionMethod $accesso
{
$attributes = $accessor->getAttributes(Cell::class, ReflectionAttribute::IS_INSTANCEOF);
if ([] === $attributes) {
if (!$accessor instanceof ReflectionProperty) {
return null;
}

if ($accessor->isStatic()) {
if (!$accessor instanceof ReflectionProperty || $accessor->isStatic() || !$accessor->isPublic()) {
return null;
}

Expand Down

0 comments on commit 456cd16

Please sign in to comment.