3
3
namespace PHPStan \Reflection \Nette ;
4
4
5
5
use PHPStan \Reflection \ClassReflection ;
6
- use PHPStan \Reflection \MethodReflection ;
7
- use PHPStan \Reflection \PropertyReflection ;
6
+ use PHPStan \Reflection \Php \ PhpMethodReflection ;
7
+ use PHPStan \Reflection \Php \ PhpPropertyReflection ;
8
8
9
9
class NetteObjectClassReflectionExtensionTest extends \PHPUnit \Framework \TestCase
10
10
{
@@ -107,30 +107,30 @@ private function mockClassReflection(\ReflectionClass $class): ClassReflection
107
107
{
108
108
$ classReflection = $ this ->createMock (ClassReflection::class);
109
109
$ classReflection ->method ('getNativeReflection ' )->will ($ this ->returnValue ($ class ));
110
- $ classReflection ->method ('hasProperty ' )->will (
110
+ $ classReflection ->method ('hasNativeProperty ' )->will (
111
111
$ this ->returnCallback (
112
112
function (string $ property ) use ($ class ): bool {
113
113
return $ class ->hasProperty ($ property );
114
114
}
115
115
)
116
116
);
117
- $ classReflection ->method ('getProperty ' )->will (
117
+ $ classReflection ->method ('getNativeProperty ' )->will (
118
118
$ this ->returnCallback (
119
- function (string $ property ) use ($ class ): PropertyReflection {
119
+ function (string $ property ) use ($ class ): PhpPropertyReflection {
120
120
return $ this ->mockPropertyReflection ($ class ->getProperty ($ property ));
121
121
}
122
122
)
123
123
);
124
- $ classReflection ->method ('hasMethod ' )->will (
124
+ $ classReflection ->method ('hasNativeMethod ' )->will (
125
125
$ this ->returnCallback (
126
126
function (string $ method ) use ($ class ): bool {
127
127
return $ class ->hasMethod ($ method );
128
128
}
129
129
)
130
130
);
131
- $ classReflection ->method ('getMethod ' )->will (
131
+ $ classReflection ->method ('getNativeMethod ' )->will (
132
132
$ this ->returnCallback (
133
- function (string $ method ) use ($ class ): MethodReflection {
133
+ function (string $ method ) use ($ class ): PhpMethodReflection {
134
134
return $ this ->mockMethodReflection ($ class ->getMethod ($ method ));
135
135
}
136
136
)
@@ -139,17 +139,17 @@ function (string $method) use ($class): MethodReflection {
139
139
return $ classReflection ;
140
140
}
141
141
142
- private function mockMethodReflection (\ReflectionMethod $ method ): MethodReflection
142
+ private function mockMethodReflection (\ReflectionMethod $ method ): PhpMethodReflection
143
143
{
144
- $ methodReflection = $ this ->createMock (MethodReflection ::class);
144
+ $ methodReflection = $ this ->createMock (PhpMethodReflection ::class);
145
145
$ methodReflection ->method ('isPublic ' )->will ($ this ->returnValue ($ method ->isPublic ()));
146
146
$ methodReflection ->method ('isStatic ' )->will ($ this ->returnValue ($ method ->isStatic ()));
147
147
return $ methodReflection ;
148
148
}
149
149
150
- private function mockPropertyReflection (\ReflectionProperty $ property ): PropertyReflection
150
+ private function mockPropertyReflection (\ReflectionProperty $ property ): PhpPropertyReflection
151
151
{
152
- $ propertyReflection = $ this ->createMock (PropertyReflection ::class);
152
+ $ propertyReflection = $ this ->createMock (PhpPropertyReflection ::class);
153
153
$ propertyReflection ->method ('isPublic ' )->will ($ this ->returnValue ($ property ->isPublic ()));
154
154
return $ propertyReflection ;
155
155
}
0 commit comments