Test Failed
Push — master ( 135f34...8b25c6 )
by Chris
33:49
created

AbstractTwigView::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Leonidas\Library\Admin\Component\Abstracts;
4
5
use Leonidas\Contracts\Ui\ViewInterface;
6
use Leonidas\Library\Admin\Access\Twig;
7
8
abstract class AbstractTwigView implements ViewInterface
9
{
10
    protected string $template;
11
12
    public function render(array $context = []): string
13
    {
14
        return Twig::render($this->getTemplate(), $context);
15
    }
16
17
    protected function getTemplate(): string
18
    {
19
        return $this->template;
20
    }
21
}
22