@@ -528,16 +528,12 @@ private function createMethod(
528528
529529 if ($ this ->signatureMapProvider ->hasMethodSignature ($ declaringClassName , $ methodReflection ->getName ())) {
530530 $ variantsByType = ['positional ' => []];
531- $ reflectionMethod = null ;
532531 $ throwType = null ;
533532 $ asserts = Assertions::createEmpty ();
534533 $ acceptsNamedArguments = true ;
535534 $ selfOutType = null ;
536535 $ phpDocComment = null ;
537- if ($ classReflection ->getNativeReflection ()->hasMethod ($ methodReflection ->getName ())) {
538- $ reflectionMethod = $ classReflection ->getNativeReflection ()->getMethod ($ methodReflection ->getName ());
539- }
540- $ methodSignaturesResult = $ this ->signatureMapProvider ->getMethodSignatures ($ declaringClassName , $ methodReflection ->getName (), $ reflectionMethod );
536+ $ methodSignaturesResult = $ this ->signatureMapProvider ->getMethodSignatures ($ declaringClassName , $ methodReflection ->getName (), $ methodReflection );
541537 foreach ($ methodSignaturesResult as $ signatureType => $ methodSignatures ) {
542538 if ($ methodSignatures === null ) {
543539 continue ;
@@ -615,15 +611,15 @@ private function createMethod(
615611 }
616612 }
617613 }
618- if ($ stubPhpDocPair === null && $ reflectionMethod !== null && $ reflectionMethod ->getDocComment () !== false ) {
619- $ filename = $ reflectionMethod ->getFileName ();
614+ if ($ stubPhpDocPair === null && $ methodReflection ->getDocComment () !== false ) {
615+ $ filename = $ methodReflection ->getFileName ();
620616 if ($ filename !== false ) {
621617 $ phpDocBlock = $ this ->fileTypeMapper ->getResolvedPhpDoc (
622618 $ filename ,
623619 $ declaringClassName ,
624620 null ,
625- $ reflectionMethod ->getName (),
626- $ reflectionMethod ->getDocComment (),
621+ $ methodReflection ->getName (),
622+ $ methodReflection ->getDocComment (),
627623 );
628624 $ throwsTag = $ phpDocBlock ->getThrowsTag ();
629625 if ($ throwsTag !== null ) {
@@ -655,7 +651,7 @@ private function createMethod(
655651 }
656652
657653 $ signatureParameters = $ methodSignature ->getParameters ();
658- foreach ($ reflectionMethod ->getParameters () as $ paramI => $ reflectionParameter ) {
654+ foreach ($ methodReflection ->getParameters () as $ paramI => $ reflectionParameter ) {
659655 if (!array_key_exists ($ paramI , $ signatureParameters )) {
660656 continue ;
661657 }
0 commit comments