Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| Error | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| with | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __invoke | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Computator\FrameworkUtils\PHPTemplate\RenderObjects; |
| 4 | |
| 5 | use Computator\FrameworkUtils\PHPTemplate\Exceptions; |
| 6 | use Computator\FrameworkUtils\PHPTemplate\UserApi; |
| 7 | |
| 8 | class Error implements UserApi\ResolvedTemplateClient { |
| 9 | public function __construct( |
| 10 | protected readonly UserApi\RenderManager $renderer, |
| 11 | public readonly Exceptions\TemplateRenderException $exception, |
| 12 | ) {} |
| 13 | |
| 14 | public function with(mixed ...$_): self { |
| 15 | return $this; |
| 16 | } |
| 17 | |
| 18 | public function __invoke(): void { |
| 19 | $this->renderer->renderError($this->exception->getMessage()); |
| 20 | } |
| 21 | } |