Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public static function fromTemplate( |
||
25 | WikiTemplateInterface $template, |
||
26 | ?string $wikiPageTitle = null, |
||
27 | ?LoggerInterface $log = null |
||
28 | ): ?TemplateOptimizerInterface { |
||
29 | if ($template instanceof OuvrageTemplate) { |
||
30 | return new OuvrageOptimize($template, $wikiPageTitle, $log); |
||
31 | } |
||
32 | if ($template instanceof ArticleTemplate) { |
||
33 | return new ArticleOptimizer($template, $wikiPageTitle, $log); |
||
34 | } |
||
35 | if ($template instanceof LienWebTemplate) { |
||
36 | return new LienWebOptimizer($template, $wikiPageTitle, $log); |
||
37 | } |
||
38 | |||
39 | return null; |
||
40 | } |
||
42 |