Completed
Push — v4.0 ( 3a8f05...488a49 )
by
unknown
03:09
created

PlatesRenderTemplate::renderTemplate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates\RenderTemplate;
4
5
use League\Plates;
6
7
class PlatesRenderTemplate implements Plates\RenderTemplate
8
{
9
    public function renderTemplate(Plates\Template $template) {
10
        $context = $template->getContext();
11
        if (isset($context['layout'])) {
12
            return $this->renderTemplate($context['layout']);
13
        }
14
15
        return (string) $template->getContent();
16
    }
17
}
18