Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed getName() to name on all Reflection* object calls (fixes #455…

  • Loading branch information...
commit 28893196713665db094d474aad8392a413b28b68 1 parent b719445
@fabpot fabpot authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 Normalizer/GetSetMethodNormalizer.php
View
10 Normalizer/GetSetMethodNormalizer.php
@@ -74,7 +74,7 @@ public function normalize($object, $format = null)
$attributes = array();
foreach ($reflectionMethods as $method) {
if ($this->isGetMethod($method)) {
- $attributeName = lcfirst(substr($method->getName(), 3));
+ $attributeName = lcfirst(substr($method->name, 3));
if (in_array($attributeName, $this->ignoredAttributes)) {
continue;
@@ -108,7 +108,7 @@ public function denormalize($data, $class, $format = null)
$params = array();
foreach ($constructorParameters as $constructorParameter) {
- $paramName = lcfirst($constructorParameter->getName());
+ $paramName = lcfirst($constructorParameter->name);
if (isset($data[$paramName])) {
$params[] = $data[$paramName];
@@ -118,7 +118,7 @@ public function denormalize($data, $class, $format = null)
throw new RuntimeException(
'Cannot create an instance of '.$class.
' from serialized data because its constructor requires '.
- 'parameter "'.$constructorParameter->getName().
+ 'parameter "'.$constructorParameter->name.
'" to be present.');
}
}
@@ -182,8 +182,8 @@ private function supports($class)
private function isGetMethod(\ReflectionMethod $method)
{
return (
- 0 === strpos($method->getName(), 'get') &&
- 3 < strlen($method->getName()) &&
+ 0 === strpos($method->name, 'get') &&
+ 3 < strlen($method->name) &&
0 === $method->getNumberOfRequiredParameters()
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.