| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | #[AutoconfigureTag(ExceptionFormatterLocator::EXCEPTION_FORMATTERS_TAG)] |
||
| 14 | 1 | class ThrowableFormatter implements FormatterInterface |
|
| 15 | { |
||
| 16 | 1 | public function __invoke(\Throwable $e): ContractErrorInterface |
|
| 17 | { |
||
| 18 | 1 | return new ContractError('Internal Server Error', Response::HTTP_INTERNAL_SERVER_ERROR, trace: $e->getTrace()); |
|
| 19 | } |
||
| 20 | |||
| 21 | 1 | public static function getExceptionClass(): string |
|
| 22 | { |
||
| 23 | 1 | return \Throwable::class; |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public static function getPriority(): int |
|
| 29 | } |
||
| 30 | } |
||
| 31 |