File tree 1 file changed +15
-1
lines changed
src/ProxyManager/Generator
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use Laminas \Code \Generator \DocBlockGenerator ;
8
8
use Laminas \Code \Generator \MethodGenerator as LaminasMethodGenerator ;
9
+ use Laminas \Code \Generator \ParameterGenerator ;
9
10
use Laminas \Code \Reflection \MethodReflection ;
10
11
use ReflectionException ;
11
12
use ReflectionMethod ;
@@ -23,7 +24,7 @@ class MethodGenerator extends LaminasMethodGenerator
23
24
public static function fromReflectionWithoutBodyAndDocBlock (MethodReflection $ reflectionMethod ): self
24
25
{
25
26
/** @var static $method */
26
- $ method = parent ::copyMethodSignature ($ reflectionMethod );
27
+ $ method = static ::copyMethodSignature ($ reflectionMethod );
27
28
28
29
$ method ->setInterface (false );
29
30
$ method ->setBody ('' );
@@ -55,6 +56,19 @@ public static function fromReflectionWithoutBodyAndDocBlock(MethodReflection $re
55
56
return $ method ;
56
57
}
57
58
59
+ public static function copyMethodSignature (MethodReflection $ reflectionMethod ): parent
60
+ {
61
+ $ method = parent ::copyMethodSignature ($ reflectionMethod );
62
+
63
+ foreach ($ reflectionMethod ->getParameters () as $ reflectionParameter ) {
64
+ $ method ->setParameter (
65
+ ParameterGenerator::fromReflection ($ reflectionParameter )
66
+ );
67
+ }
68
+
69
+ return $ method ;
70
+ }
71
+
58
72
public function getDocBlock (): ?DocBlockGenerator
59
73
{
60
74
$ docBlock = parent ::getDocBlock ();
You can’t perform that action at this time.
0 commit comments