Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function create() : void |
||
14 | { |
||
15 | $preAliasTemplate = ' |
||
16 | %indent%/** |
||
17 | %indent% * @Bean({"aliases" = {'; |
||
18 | |||
19 | $postAliasTemplate = ' |
||
20 | %indent% * }}) |
||
21 | %indent% */ |
||
22 | %indent%public function get%classWithoutBackslashes%() : \%class% |
||
23 | %indent%{ |
||
24 | %indent% return new \%class%(); |
||
25 | %indent%}'; |
||
26 | |||
27 | $this->getWriter()->write($preAliasTemplate); |
||
28 | $this->writeAliases(); |
||
29 | $this->getWriter()->write(str_replace( |
||
30 | [ |
||
31 | '%class%', |
||
32 | '%classWithoutBackslashes%', |
||
33 | ], |
||
34 | [ |
||
35 | $this->getClass(), |
||
36 | str_replace('\\', '', $this->getClass()), |
||
37 | ], |
||
38 | $postAliasTemplate |
||
39 | )); |
||
42 |