DirectView::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 2
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
}