| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function register(ContainerInterface $app) |
||
| 17 | { |
||
| 18 | $app->closure(Twig_Environment::class, function () { |
||
| 19 | $loader = new Twig_Loader_Filesystem(config('twig.path', config('view.path'))); |
||
| 20 | $options = [ |
||
| 21 | 'auto_reload' => true, |
||
| 22 | ]; |
||
| 23 | $cachePath = config('view.cache'); |
||
| 24 | if ($cachePath) { |
||
| 25 | $options['cache'] = $cachePath; |
||
| 26 | } |
||
| 27 | return new Twig_Environment($loader, $options); |
||
| 28 | }); |
||
| 29 | $app->bind(RenderInterface::class, TwigView::class); |
||
| 30 | } |
||
| 31 | |||
| 39 |