Passed
Push — master ( 485131...a367f2 )
by Radu
02:24
created

Template::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 3
1
<?php
2
namespace WebServCo\Framework\Utils;
3
4
final class Template
5
{
6
    public static function render($templatePath, $templateName, $data)
7
    {
8
        $output = new \WebServCo\Framework\Libraries\HtmlOutput();
9
        foreach ($data as $k => $v) {
10
            $output->setData($k, $v);
11
        }
12
        $output->setPath($templatePath);
13
14
        $output->setTemplate($templateName);
15
        return $output->render();
16
    }
17
}
18