-
-
Notifications
You must be signed in to change notification settings - Fork 35
Description
(I am not sure about the issue category for this, so I first wish to apologize for using the "bug-report" type)
In line:
laminas-hydrator/src/ClassMethodsHydrator.php
Line 224 in cd865fc
| $propertyFqn = $objectClass . '::$' . $property; |
$property is actually a key in the $data array, so it may be a snake-cased key like first_name for a matching setter setFirstName for an object's property firstName. The real property name can often be obtained by calling hydrateName($name) (...but it could also be different from camelCase conventional names).
Wouldn't it be better to rename $property to $name (or $key, but $name is used elsewhere) and $propertyFqn to something like $cacheKey or $fqSetterKey? I know this is a trivial matter, but when I first read $property my mind automatically associated it with the $object despite the foreach loop...
kind regards
(for this repo's team reviewers...if unuseful please feel free to close this issue at once...no explanation needed)