Total Complexity | 2 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class ErrorResponseGenerator implements ErrorResponseGeneratorInterface |
||
16 | { |
||
17 | use ExtractErrorDataTrait; |
||
18 | |||
19 | /** |
||
20 | * @var ResponseFactoryInterface |
||
21 | */ |
||
22 | private ResponseFactoryInterface $responseFactory; |
||
23 | |||
24 | /** |
||
25 | * @var TemplateRendererInterface |
||
26 | */ |
||
27 | private TemplateRendererInterface $template; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private string $view; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | private bool $debug; |
||
38 | |||
39 | /** |
||
40 | * @param ResponseFactoryInterface $responseFactory |
||
41 | * @param TemplateRendererInterface $template |
||
42 | * @param string $view |
||
43 | * @param bool $debug |
||
44 | */ |
||
45 | 14 | public function __construct( |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | 6 | public function generate(Throwable $error, ServerRequestInterface $request): ResponseInterface |
|
74 |