From 5bd0707da2b5f8ff34273637965e0590f4872589 Mon Sep 17 00:00:00 2001 From: Ian Foulds Date: Sun, 1 Oct 2023 17:28:57 +0100 Subject: [PATCH] Bug fix for issue #113 - Use static instead of self. Signed-off-by: Ian Foulds --- src/ReflectionHydrator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReflectionHydrator.php b/src/ReflectionHydrator.php index 9718743..a94cc6c 100644 --- a/src/ReflectionHydrator.php +++ b/src/ReflectionHydrator.php @@ -24,7 +24,7 @@ class ReflectionHydrator extends AbstractHydrator public function extract(object $object): array { $result = []; - foreach (self::getReflProperties($object) as $property) { + foreach (static::getReflProperties($object) as $property) { $propertyName = $this->extractName($property->getName(), $object); if (! $this->getCompositeFilter()->filter($propertyName)) { continue; @@ -44,7 +44,7 @@ public function extract(object $object): array */ public function hydrate(array $data, object $object) { - $reflProperties = self::getReflProperties($object); + $reflProperties = static::getReflProperties($object); foreach ($data as $key => $value) { $name = $this->hydrateName($key, $data); if (isset($reflProperties[$name])) {