1 | <?php |
||
12 | class MethodTemplate implements TemplateInterface |
||
13 | { |
||
14 | use VisibilityTrait; |
||
15 | |||
16 | private const TEMPLATE = ' |
||
17 | %s %s function %s %s(%s)%s |
||
18 | { |
||
19 | %s $this->__call("%s", func_get_args()); |
||
20 | } |
||
21 | '; |
||
22 | |||
23 | /** |
||
24 | * @param \Reflector|\ReflectionMethod $method |
||
25 | * @return string |
||
26 | * @throws \RuntimeException |
||
27 | * @throws InvalidArgumentException |
||
28 | */ |
||
29 | 11 | public static function generate(\Reflector $method): string |
|
33 | |||
34 | /** |
||
35 | * @param \ReflectionMethod $method |
||
36 | * @return string |
||
37 | * @throws \RuntimeException |
||
38 | * @throws InvalidArgumentException |
||
39 | */ |
||
40 | 11 | protected static function doGenerate(\ReflectionMethod $method): string |
|
78 | } |
||
79 |