@@ -48,11 +48,12 @@ public function getTestMethodReflection(ClassReflection $classReflection, Method
4848 */
4949 public function getTestMethods (ClassReflection $ classReflection , Scope $ scope ): array
5050 {
51- if (array_key_exists ($ classReflection ->getName (), $ this ->methodCache )) {
52- return $ this ->methodCache [$ classReflection ->getName ()];
51+ $ className = $ classReflection ->getName ();
52+ if (array_key_exists ($ className , $ this ->methodCache )) {
53+ return $ this ->methodCache [$ className ];
5354 }
5455 if (!$ classReflection ->is (TestCase::class)) {
55- return $ this ->methodCache [$ classReflection -> getName () ] = [];
56+ return $ this ->methodCache [$ className ] = [];
5657 }
5758
5859 $ testMethods = [];
@@ -70,7 +71,7 @@ public function getTestMethods(ClassReflection $classReflection, Scope $scope):
7071 if ($ docComment !== null ) {
7172 $ methodPhpDoc = $ this ->fileTypeMapper ->getResolvedPhpDoc (
7273 $ scope ->getFile (),
73- $ classReflection -> getName () ,
74+ $ className ,
7475 $ scope ->isInTrait () ? $ scope ->getTraitReflection ()->getName () : null ,
7576 $ reflectionMethod ->getName (),
7677 $ docComment ,
@@ -94,7 +95,7 @@ public function getTestMethods(ClassReflection $classReflection, Scope $scope):
9495 $ testMethods [] = $ reflectionMethod ;
9596 }
9697
97- return $ this ->methodCache [$ classReflection -> getName () ] = $ testMethods ;
98+ return $ this ->methodCache [$ className ] = $ testMethods ;
9899 }
99100
100101 private function hasTestAnnotation (?ResolvedPhpDocBlock $ phpDoc ): bool
0 commit comments