33namespace PHPStan\Reflection\Nette;
44
55use 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 ;
88
99class NetteObjectClassReflectionExtensionTest extends \PHPUnit\Framework\TestCase
1010{
@@ -107,30 +107,30 @@ private function mockClassReflection(\ReflectionClass $class): ClassReflection
107107 {
108108 $classReflection = $this->createMock(ClassReflection::class);
109109 $classReflection->method('getNativeReflection')->will($this->returnValue($class));
110- $classReflection->method('hasProperty ')->will(
110+ $classReflection->method('hasNativeProperty ')->will(
111111 $this->returnCallback(
112112 function (string $property) use ($class): bool {
113113 return $class->hasProperty($property);
114114 }
115115 )
116116 );
117- $classReflection->method('getProperty ')->will(
117+ $classReflection->method('getNativeProperty ')->will(
118118 $this->returnCallback(
119- function (string $property) use ($class): PropertyReflection {
119+ function (string $property) use ($class): PhpPropertyReflection {
120120 return $this->mockPropertyReflection($class->getProperty($property));
121121 }
122122 )
123123 );
124- $classReflection->method('hasMethod ')->will(
124+ $classReflection->method('hasNativeMethod ')->will(
125125 $this->returnCallback(
126126 function (string $method) use ($class): bool {
127127 return $class->hasMethod($method);
128128 }
129129 )
130130 );
131- $classReflection->method('getMethod ')->will(
131+ $classReflection->method('getNativeMethod ')->will(
132132 $this->returnCallback(
133- function (string $method) use ($class): MethodReflection {
133+ function (string $method) use ($class): PhpMethodReflection {
134134 return $this->mockMethodReflection($class->getMethod($method));
135135 }
136136 )
@@ -139,17 +139,17 @@ function (string $method) use ($class): MethodReflection {
139139 return $classReflection;
140140 }
141141
142- private function mockMethodReflection(\ReflectionMethod $method): MethodReflection
142+ private function mockMethodReflection(\ReflectionMethod $method): PhpMethodReflection
143143 {
144- $methodReflection = $this->createMock(MethodReflection ::class);
144+ $methodReflection = $this->createMock(PhpMethodReflection ::class);
145145 $methodReflection->method('isPublic')->will($this->returnValue($method->isPublic()));
146146 $methodReflection->method('isStatic')->will($this->returnValue($method->isStatic()));
147147 return $methodReflection;
148148 }
149149
150- private function mockPropertyReflection(\ReflectionProperty $property): PropertyReflection
150+ private function mockPropertyReflection(\ReflectionProperty $property): PhpPropertyReflection
151151 {
152- $propertyReflection = $this->createMock(PropertyReflection ::class);
152+ $propertyReflection = $this->createMock(PhpPropertyReflection ::class);
153153 $propertyReflection->method('isPublic')->will($this->returnValue($property->isPublic()));
154154 return $propertyReflection;
155155 }
0 commit comments