@@ -74,7 +74,7 @@ public function normalize($object, $format = null)
74
74
$ attributes = array ();
75
75
foreach ($ reflectionMethods as $ method ) {
76
76
if ($ this ->isGetMethod ($ method )) {
77
- $ attributeName = lcfirst (substr ($ method ->getName () , 3 ));
77
+ $ attributeName = lcfirst (substr ($ method ->name , 3 ));
78
78
79
79
if (in_array ($ attributeName , $ this ->ignoredAttributes )) {
80
80
continue ;
@@ -108,7 +108,7 @@ public function denormalize($data, $class, $format = null)
108
108
109
109
$ params = array ();
110
110
foreach ($ constructorParameters as $ constructorParameter ) {
111
- $ paramName = lcfirst ($ constructorParameter ->getName () );
111
+ $ paramName = lcfirst ($ constructorParameter ->name );
112
112
113
113
if (isset ($ data [$ paramName ])) {
114
114
$ params [] = $ data [$ paramName ];
@@ -118,7 +118,7 @@ public function denormalize($data, $class, $format = null)
118
118
throw new RuntimeException (
119
119
'Cannot create an instance of ' .$ class .
120
120
' from serialized data because its constructor requires ' .
121
- 'parameter " ' .$ constructorParameter ->getName () .
121
+ 'parameter " ' .$ constructorParameter ->name .
122
122
'" to be present. ' );
123
123
}
124
124
}
@@ -182,8 +182,8 @@ private function supports($class)
182
182
private function isGetMethod (\ReflectionMethod $ method )
183
183
{
184
184
return (
185
- 0 === strpos ($ method ->getName () , 'get ' ) &&
186
- 3 < strlen ($ method ->getName () ) &&
185
+ 0 === strpos ($ method ->name , 'get ' ) &&
186
+ 3 < strlen ($ method ->name ) &&
187
187
0 === $ method ->getNumberOfRequiredParameters ()
188
188
);
189
189
}
0 commit comments