GetSetMethodNormalizer uses lcfirst instead of strtolower when computing method names

This commit is contained in:
Eric Clemmons 2011-12-27 13:16:20 -08:00
parent 01fcb1bdd7
commit 85bf553cca

View File

@ -46,7 +46,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
$attributes = array();
foreach ($reflectionMethods as $method) {
if ($this->isGetMethod($method)) {
$attributeName = strtolower(substr($method->getName(), 3));
$attributeName = lcfirst(substr($method->getName(), 3));
$attributeValue = $method->invoke($object);
if (null !== $attributeValue && !is_scalar($attributeValue)) {
@ -73,7 +73,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
$params = array();
foreach ($constructorParameters as $constructorParameter) {
$paramName = strtolower($constructorParameter->getName());
$paramName = lcfirst($constructorParameter->getName());
if (isset($data[$paramName])) {
$params[] = $data[$paramName];