Conditions | 4 |
Paths | 3 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
15 | 32 | public function renderTemplate(Plates\Template $template, Plates\RenderTemplate $rt = null) { |
|
16 | 32 | foreach ($this->render_sets as list($match, $render)) { |
|
17 | 28 | if ($match($template)) { |
|
18 | 28 | return $render->renderTemplate($template, $rt ?: $this); |
|
19 | } |
||
20 | } |
||
21 | |||
22 | 4 | throw new Plates\Exception\RenderTemplateException('No renderer was available for the template: ' . $template->name); |
|
23 | } |
||
24 | } |
||
25 |