@@ -528,16 +528,12 @@ private function createMethod(
528
528
529
529
if ($ this ->signatureMapProvider ->hasMethodSignature ($ declaringClassName , $ methodReflection ->getName ())) {
530
530
$ variantsByType = ['positional ' => []];
531
- $ reflectionMethod = null ;
532
531
$ throwType = null ;
533
532
$ asserts = Assertions::createEmpty ();
534
533
$ acceptsNamedArguments = true ;
535
534
$ selfOutType = null ;
536
535
$ 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 );
541
537
foreach ($ methodSignaturesResult as $ signatureType => $ methodSignatures ) {
542
538
if ($ methodSignatures === null ) {
543
539
continue ;
@@ -615,15 +611,15 @@ private function createMethod(
615
611
}
616
612
}
617
613
}
618
- if ($ stubPhpDocPair === null && $ reflectionMethod !== null && $ reflectionMethod ->getDocComment () !== false ) {
619
- $ filename = $ reflectionMethod ->getFileName ();
614
+ if ($ stubPhpDocPair === null && $ methodReflection ->getDocComment () !== false ) {
615
+ $ filename = $ methodReflection ->getFileName ();
620
616
if ($ filename !== false ) {
621
617
$ phpDocBlock = $ this ->fileTypeMapper ->getResolvedPhpDoc (
622
618
$ filename ,
623
619
$ declaringClassName ,
624
620
null ,
625
- $ reflectionMethod ->getName (),
626
- $ reflectionMethod ->getDocComment (),
621
+ $ methodReflection ->getName (),
622
+ $ methodReflection ->getDocComment (),
627
623
);
628
624
$ throwsTag = $ phpDocBlock ->getThrowsTag ();
629
625
if ($ throwsTag !== null ) {
@@ -655,7 +651,7 @@ private function createMethod(
655
651
}
656
652
657
653
$ signatureParameters = $ methodSignature ->getParameters ();
658
- foreach ($ reflectionMethod ->getParameters () as $ paramI => $ reflectionParameter ) {
654
+ foreach ($ methodReflection ->getParameters () as $ paramI => $ reflectionParameter ) {
659
655
if (!array_key_exists ($ paramI , $ signatureParameters )) {
660
656
continue ;
661
657
}
0 commit comments