| Total Complexity | 5 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class PhpTemplatesRenderer implements RendererInterface |
||
| 13 | { |
||
| 14 | /** @var EngineInterface */ |
||
| 15 | private $engine; |
||
| 16 | |||
| 17 | 3 | public function __construct(EngineInterface $engine) |
|
| 18 | { |
||
| 19 | 3 | $this->engine = $engine; |
|
| 20 | 3 | } |
|
| 21 | |||
| 22 | 2 | public function supports(TagInterface $tag): bool |
|
| 23 | { |
||
| 24 | 2 | return $tag instanceof PhpTemplatesTagInterface || ($tag instanceof TemplateTagInterface && $tag->getTemplateType() === 'php'); |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param TemplateTagInterface|TagInterface $tag |
||
| 29 | */ |
||
| 30 | 1 | public function render(TagInterface $tag): string |
|
| 33 | } |
||
| 34 | } |
||
| 35 |