| Conditions | 2 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function register(ContainerInterface $app) |
||
| 17 | { |
||
| 18 | $app->closure(Engine::class, function () { |
||
| 19 | $engine = new Engine(); |
||
| 20 | $engine->setLoader(new FileLoader()); |
||
| 21 | $cachePath = config('view.cache'); |
||
| 22 | if ($cachePath) { |
||
| 23 | $engine->setTempDirectory($cachePath); |
||
| 24 | } |
||
| 25 | return $engine; |
||
| 26 | }); |
||
| 27 | $app->closure(RenderInterface::class, function ($app) { |
||
| 28 | return new LatteView( |
||
| 29 | $app[Engine::class], |
||
| 30 | config('view.path') |
||
| 31 | ); |
||
| 32 | }); |
||
| 33 | } |
||
| 34 | |||
| 42 |