| Total Complexity | 4 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class BladeRenderer implements RendererInterface |
||
| 10 | { |
||
| 11 | private BladeOne $renderer; |
||
|
|
|||
| 12 | |||
| 13 | public function __construct($viewPaths = '', $cachePath = '') |
||
| 14 | { |
||
| 15 | if ($viewPaths !== '' && $viewPaths !== '') { |
||
| 16 | $this->renderer = new BladeOne($viewPaths, $cachePath, BladeOne::MODE_AUTO); |
||
| 17 | } |
||
| 18 | } |
||
| 19 | |||
| 20 | public function render(string $filename, array $data): string |
||
| 21 | { |
||
| 22 | return $this->renderer->run($filename, $data); |
||
| 23 | } |
||
| 25 |