Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | #[Attribute] |
||
14 | class Render |
||
15 | { |
||
16 | protected array $args; |
||
17 | |||
18 | 29 | public function __construct(protected string $renderer, mixed ...$args) |
|
21 | } |
||
22 | |||
23 | 1 | public function render(Registry $registry, mixed $data): string |
|
24 | { |
||
25 | 1 | return $this->getRenderer($registry)->render($data, ...$this->args); |
|
26 | } |
||
27 | |||
28 | 23 | public function response(Registry $registry, mixed $data): ResponseWrapper |
|
31 | } |
||
32 | |||
33 | 24 | protected function getRenderer(Registry $registry): Renderer |
|
39 | } |
||
40 | } |
||
41 |