| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class ErrorJsonResponseGenerator implements ErrorResponseGeneratorInterface |
||
| 16 | { |
||
| 17 | use ExtractErrorDataTrait; |
||
| 18 | use PrepareJsonDataTrait; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var bool |
||
| 22 | */ |
||
| 23 | private bool $debug; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param bool $debug |
||
| 27 | */ |
||
| 28 | 18 | public function __construct(bool $debug = false) |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritDoc} |
||
| 35 | */ |
||
| 36 | 6 | public function generate(Throwable $error, ServerRequestInterface $request): ResponseInterface |
|
| 50 |