Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class FatalErrorHandler |
||
8 | { |
||
9 | /** |
||
10 | * Transform some specific PHP fatal errors into HTTP 500 with a JSON response |
||
11 | * containing the error message (only). So that the client might show the error to the end-user. |
||
12 | * |
||
13 | * This must be called exactly **ONE TIME**. |
||
14 | * |
||
15 | * This will only work if HTTP headers were not sent already. So in development, |
||
16 | * where `error_reporting` is most likely enabled, it might not work. |
||
17 | */ |
||
18 | public static function register(): void |
||
31 |