| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | 62 | public static function withErrorHandlerForDOMDocument(callable $callback): mixed |
|
| 47 | { |
||
| 48 | 62 | return self::withErrorHandler(static function (int $code, string $message): bool { |
|
| 49 | 6 | if (str_contains($message, 'DOMDocument::')) { |
|
| 50 | 6 | throw new DOMException($message, $code); |
|
| 51 | } |
||
| 52 | |||
| 53 | // @codeCoverageIgnoreStart |
||
| 54 | return false; |
||
| 55 | // @codeCoverageIgnoreEnd |
||
| 56 | 62 | }, $callback); |
|
| 57 | } |
||
| 73 |