| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 87.5% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class TwigFactory |
||
| 19 | { |
||
| 20 | private Config $config; |
||
| 21 | private LoggerInterface $logger; |
||
| 22 | private Builder $builder; |
||
| 23 | |||
| 24 | 1 | public function __construct( |
|
| 25 | Config $config, |
||
| 26 | LoggerInterface $logger, |
||
| 27 | Builder $builder |
||
| 28 | ) { |
||
| 29 | 1 | $this->config = $config; |
|
| 30 | 1 | $this->logger = $logger; |
|
| 31 | 1 | $this->builder = $builder; |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Creates a Twig renderer instance. |
||
| 36 | * |
||
| 37 | * @param string|array|null $templatesPath Template path(s) (uses default config if null) |
||
| 38 | * @return Twig Configured renderer instance |
||
| 39 | */ |
||
| 40 | 1 | public function create(string|array|null $templatesPath = null): Twig |
|
| 47 | } |
||
| 48 | } |
||
| 49 |