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
11
12
/**
@@ -19,14 +20,27 @@ class MethodGenerator extends LaminasMethodGenerator
19
20
public static function fromReflectionWithoutBodyAndDocBlock (MethodReflection $ reflectionMethod ): self
20
21
{
21
22
/** @var static $method */
22
- $ method = parent ::copyMethodSignature ($ reflectionMethod );
23
+ $ method = static ::copyMethodSignature ($ reflectionMethod );
23
24
24
25
$ method ->setInterface (false );
25
26
$ method ->setBody ('' );
26
27
27
28
return $ method ;
28
29
}
29
30
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
+
30
44
/**
31
45
* {@inheritDoc} override needed to specify type in more detail
32
46
*/
You can’t perform that action at this time.
0 commit comments