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