Conditions | 4 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.128 |
Changes | 0 |
1 | <?php |
||
16 | 24 | public function renderTemplate(Plates\Template $template, Plates\RenderTemplate $rt = null) { |
|
17 | 24 | $path = $template->get('path'); |
|
18 | 24 | if (!$path || ($this->file_exists)($path)) { |
|
19 | 24 | return $this->render->renderTemplate($template, $rt ?: null); |
|
20 | } |
||
21 | |||
22 | throw new Plates\Exception\RenderTemplateException('Template path ' . $path . ' is not a valid path for template: ' . $template->name); |
||
23 | } |
||
24 | } |
||
25 |