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