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

Template   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 10 2
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