Total Complexity | 5 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class TwigTag extends Tag implements TwigTagInterface |
||
8 | { |
||
9 | /** @var string */ |
||
10 | private $template; |
||
11 | |||
12 | /** @var array */ |
||
13 | private $context = []; |
||
14 | |||
15 | 4 | public function __construct(string $key, string $template) |
|
16 | { |
||
17 | 4 | parent::__construct($key); |
|
18 | |||
19 | 4 | $this->template = $template; |
|
20 | 4 | } |
|
21 | |||
22 | 1 | public function getTemplate(): string |
|
25 | } |
||
26 | |||
27 | 3 | public function getContext(): array |
|
28 | { |
||
29 | 3 | return $this->context; |
|
30 | } |
||
31 | |||
32 | 2 | public function setContext(array $context): self |
|
33 | { |
||
34 | 2 | $this->context = $context; |
|
35 | |||
36 | 2 | return $this; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param mixed $value |
||
41 | */ |
||
42 | 1 | public function addContext(string $key, $value): self |
|
47 | } |
||
48 | } |
||
49 |