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

AbstractTwigView   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A getTemplate() 0 3 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