@@ -46,7 +46,7 @@ public function normalize($object, $format = null)
46
46
$ attributes = array ();
47
47
foreach ($ reflectionMethods as $ method ) {
48
48
if ($ this ->isGetMethod ($ method )) {
49
- $ attributeName = strtolower (substr ($ method ->getName () , 3 ));
49
+ $ attributeName = strtolower (substr ($ method ->name , 3 ));
50
50
51
51
$ attributeValue = $ method ->invoke ($ object );
52
52
if (null !== $ attributeValue && !is_scalar ($ attributeValue )) {
@@ -73,7 +73,7 @@ public function denormalize($data, $class, $format = null)
73
73
74
74
$ params = array ();
75
75
foreach ($ constructorParameters as $ constructorParameter ) {
76
- $ paramName = strtolower ($ constructorParameter ->getName () );
76
+ $ paramName = strtolower ($ constructorParameter ->name );
77
77
78
78
if (isset ($ data [$ paramName ])) {
79
79
$ params [] = $ data [$ paramName ];
@@ -83,7 +83,7 @@ public function denormalize($data, $class, $format = null)
83
83
throw new RuntimeException (
84
84
'Cannot create an instance of ' .$ class .
85
85
' from serialized data because its constructor requires ' .
86
- 'parameter " ' .$ constructorParameter ->getName () .
86
+ 'parameter " ' .$ constructorParameter ->name .
87
87
'" to be present. ' );
88
88
}
89
89
}
@@ -147,8 +147,8 @@ private function supports($class)
147
147
private function isGetMethod (\ReflectionMethod $ method )
148
148
{
149
149
return (
150
- 0 === strpos ($ method ->getName () , 'get ' ) &&
151
- 3 < strlen ($ method ->getName () ) &&
150
+ 0 === strpos ($ method ->name , 'get ' ) &&
151
+ 3 < strlen ($ method ->name ) &&
152
152
0 === $ method ->getNumberOfRequiredParameters ()
153
153
);
154
154
}
0 commit comments