| Total Complexity | 3 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | abstract class Exporter implements ExporterInterface |
||
| 16 | { |
||
| 17 | private Event $event; |
||
| 18 | |||
| 19 | private Environment $twig; |
||
| 20 | |||
| 21 | public function __construct(Event $event) |
||
| 22 | { |
||
| 23 | $this->twig = new Environment( |
||
| 24 | new FilesystemLoader(dirname(__DIR__) . '/templates') |
||
| 25 | ); |
||
| 26 | |||
| 27 | $this->twig->addExtension(new CamelCaseExtension()); |
||
| 28 | $this->twig->addExtension(new VarExportExtension()); |
||
| 29 | |||
| 30 | 2 | $this->event = $event; |
|
| 31 | } |
||
| 32 | 2 | ||
| 33 | 2 | /** |
|
| 34 | * @throws \Twig\Error\LoaderError |
||
| 35 | * @throws \Twig\Error\RuntimeError |
||
| 36 | 2 | * @throws \Twig\Error\SyntaxError |
|
| 37 | 2 | */ |
|
| 38 | public function exportToFile(string $template, string $destination): void |
||
| 60 | 2 | } |
|
| 61 | |||
| 62 | protected function getEvent(): Event |
||
| 67 |