Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function create() : void |
||
22 | { |
||
23 | $preAliasTemplate = ' |
||
24 | %indent%/** |
||
25 | %indent% * @Bean({"aliases" = {'; |
||
26 | |||
27 | $postAliasTemplate = ' |
||
28 | %indent% * }}) |
||
29 | %indent% */ |
||
30 | %indent%public function get%classWithoutBackslashes%() : \\%class% |
||
31 | %indent%{ |
||
32 | %indent% return (new \\%factory%())(BeanFactoryRegistry::getInstance()); |
||
33 | %indent%}'; |
||
34 | |||
35 | $this->getWriter()->write($preAliasTemplate); |
||
36 | $this->writeAliases(); |
||
37 | $this->getWriter()->write(str_replace( |
||
38 | [ |
||
39 | '%class%', |
||
40 | '%factory%', |
||
41 | '%classWithoutBackslashes%' |
||
42 | ], |
||
43 | [ |
||
44 | $this->getClass(), |
||
45 | $this->factory, |
||
46 | str_replace('\\', '', $this->getClass()), |
||
47 | ], |
||
48 | $postAliasTemplate |
||
49 | )); |
||
52 |