@@ -77,46 +77,37 @@ public function getTestedReflectionProperties(): array
77
77
{
78
78
return [
79
79
[
80
- $ this -> getReflectionProperty (BooleanModel::class, 'id ' ),
81
- $ this -> getReflectionProperty (BooleanModel::class, 'id ' ),
80
+ new ReflectionProperty (BooleanModel::class, 'id ' ),
81
+ new ReflectionProperty (BooleanModel::class, 'id ' ),
82
82
BooleanModel::class,
83
83
],
84
84
// reflection on embeddables that have properties defined in abstract ancestors:
85
85
[
86
- $ this -> getReflectionProperty (BooleanModel::class, 'id ' ),
87
- $ this -> getReflectionProperty (AbstractEmbeddable::class, 'propertyInAbstractClass ' ),
86
+ new ReflectionProperty (BooleanModel::class, 'id ' ),
87
+ new ReflectionProperty (AbstractEmbeddable::class, 'propertyInAbstractClass ' ),
88
88
ConcreteEmbeddable::class,
89
89
],
90
90
[
91
- $ this -> getReflectionProperty (BooleanModel::class, 'id ' ),
92
- $ this -> getReflectionProperty (ConcreteEmbeddable::class, 'propertyInConcreteClass ' ),
91
+ new ReflectionProperty (BooleanModel::class, 'id ' ),
92
+ new ReflectionProperty (ConcreteEmbeddable::class, 'propertyInConcreteClass ' ),
93
93
ConcreteEmbeddable::class,
94
94
],
95
95
// reflection on classes extending internal PHP classes:
96
96
[
97
- $ this -> getReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
98
- $ this -> getReflectionProperty (ArrayObjectExtendingClass::class, 'privateProperty ' ),
97
+ new ReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
98
+ new ReflectionProperty (ArrayObjectExtendingClass::class, 'privateProperty ' ),
99
99
ArrayObjectExtendingClass::class,
100
100
],
101
101
[
102
- $ this -> getReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
103
- $ this -> getReflectionProperty (ArrayObjectExtendingClass::class, 'protectedProperty ' ),
102
+ new ReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
103
+ new ReflectionProperty (ArrayObjectExtendingClass::class, 'protectedProperty ' ),
104
104
ArrayObjectExtendingClass::class,
105
105
],
106
106
[
107
- $ this -> getReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
108
- $ this -> getReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
107
+ new ReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
108
+ new ReflectionProperty (ArrayObjectExtendingClass::class, 'publicProperty ' ),
109
109
ArrayObjectExtendingClass::class,
110
110
],
111
111
];
112
112
}
113
-
114
- private function getReflectionProperty (string $ className , string $ propertyName ): ReflectionProperty
115
- {
116
- $ reflectionProperty = new ReflectionProperty ($ className , $ propertyName );
117
-
118
- $ reflectionProperty ->setAccessible (true );
119
-
120
- return $ reflectionProperty ;
121
- }
122
113
}
0 commit comments