Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | trait TwigEngineMethods |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * @inheritDoc |
||
29 | */ |
||
30 | public function update(TemplateEngineInterface $engine): void |
||
31 | { |
||
32 | if ($engine instanceof TwigTemplateEngine) { |
||
33 | /** @var ExtensionInterface $class */ |
||
34 | $class = $this->twigExtensionName; |
||
35 | $engine->sourceEngine()->addExtension(new $class()); |
||
36 | } |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @inheritDoc |
||
41 | */ |
||
42 | public function appliesTo(TemplateEngineInterface $engine): bool |
||
45 | } |
||
46 | } |
||
47 |