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 ;
1011
1112/**
@@ -19,14 +20,27 @@ class MethodGenerator extends LaminasMethodGenerator
1920 public static function fromReflectionWithoutBodyAndDocBlock (MethodReflection $ reflectionMethod ): self
2021 {
2122 /** @var static $method */
22- $ method = parent ::copyMethodSignature ($ reflectionMethod );
23+ $ method = static ::copyMethodSignature ($ reflectionMethod );
2324
2425 $ method ->setInterface (false );
2526 $ method ->setBody ('' );
2627
2728 return $ method ;
2829 }
2930
31+ public static function copyMethodSignature (MethodReflection $ reflectionMethod ): parent
32+ {
33+ $ method = parent ::copyMethodSignature ($ reflectionMethod );
34+
35+ foreach ($ reflectionMethod ->getParameters () as $ reflectionParameter ) {
36+ $ method ->setParameter (
37+ ParameterGenerator::fromReflection ($ reflectionParameter )
38+ );
39+ }
40+
41+ return $ method ;
42+ }
43+
3044 /**
3145 * {@inheritDoc} override needed to specify type in more detail
3246 */
You can’t perform that action at this time.
0 commit comments