DirectView   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 6 1
1
<?php
2
3
namespace pjpawel\Magis\View;
4
5
use pjpawel\Magis\Exception\TemplateException;
6
7
/**
8
 * @author Paweł Podgórski <[email protected]>
9
 */
10
class DirectView extends AbstractView
11
{
12
13
    /**
14
     * @inheritDoc
15
     */
16
    public function render(string $template, array $params = []): string
17
    {
18
        $template = $this->loadTemplate($template);
19
        $this->params = array_merge_recursive($params, $this->params);
20
21
        return $this->renderPhpFile($template, $this->params);
22
    }
23
24
}