File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/ProxyManager/Generator Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 66
77use Laminas \Code \Generator \DocBlockGenerator ;
88use Laminas \Code \Generator \MethodGenerator as LaminasMethodGenerator ;
9+ use Laminas \Code \Generator \ParameterGenerator ;
910use Laminas \Code \Reflection \MethodReflection ;
1011use ReflectionException ;
1112use ReflectionMethod ;
@@ -23,7 +24,7 @@ class MethodGenerator extends LaminasMethodGenerator
2324 public static function fromReflectionWithoutBodyAndDocBlock (MethodReflection $ reflectionMethod ): self
2425 {
2526 /** @var static $method */
26- $ method = parent ::copyMethodSignature ($ reflectionMethod );
27+ $ method = static ::copyMethodSignature ($ reflectionMethod );
2728
2829 $ method ->setInterface (false );
2930 $ method ->setBody ('' );
@@ -55,6 +56,19 @@ public static function fromReflectionWithoutBodyAndDocBlock(MethodReflection $re
5556 return $ method ;
5657 }
5758
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+
5872 public function getDocBlock (): ?DocBlockGenerator
5973 {
6074 $ docBlock = parent ::getDocBlock ();
You can’t perform that action at this time.
0 commit comments