File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
src/Symfony/Component/PropertyInfo Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public function getProperties($class, array $context = array())
64
64
65
65
$ properties = array ();
66
66
foreach ($ reflectionClass ->getProperties (\ReflectionProperty::IS_PUBLIC ) as $ reflectionProperty ) {
67
- $ properties [$ reflectionProperty ->name ] = true ;
67
+ $ properties [$ reflectionProperty ->name ] = $ reflectionProperty -> name ;
68
68
}
69
69
70
70
foreach ($ reflectionClass ->getMethods (\ReflectionMethod::IS_PUBLIC ) as $ reflectionMethod ) {
@@ -79,10 +79,10 @@ public function getProperties($class, array $context = array())
79
79
if (!$ reflectionClass ->hasProperty ($ propertyName ) && !preg_match ('/^[A-Z]{2,}/ ' , $ propertyName )) {
80
80
$ propertyName = lcfirst ($ propertyName );
81
81
}
82
- $ properties [$ propertyName ] = true ;
82
+ $ properties [$ propertyName ] = $ propertyName ;
83
83
}
84
84
85
- return array_keys ($ properties );
85
+ return array_values ($ properties );
86
86
}
87
87
88
88
/**
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ protected function setUp()
32
32
33
33
public function testGetProperties ()
34
34
{
35
- $ this ->assertEquals (
35
+ $ this ->assertSame (
36
36
array (
37
37
'bal ' ,
38
38
'parent ' ,
@@ -49,6 +49,7 @@ public function testGetProperties()
49
49
'a ' ,
50
50
'DOB ' ,
51
51
'Id ' ,
52
+ '123 ' ,
52
53
'c ' ,
53
54
'd ' ,
54
55
'e ' ,
Original file line number Diff line number Diff line change @@ -116,4 +116,8 @@ public function getDOB()
116
116
public function getId ()
117
117
{
118
118
}
119
+
120
+ public function get123 ()
121
+ {
122
+ }
119
123
}
You can’t perform that action at this time.
0 commit comments