Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 16 | public static function withErrorHandlerForXMLReader(callable $callback): mixed |
|
25 | { |
||
26 | 16 | return self::withErrorHandler(static function (int $code, string $message): bool { |
|
27 | 3 | if (str_contains($message, 'XMLReader::')) { |
|
28 | 3 | throw new Exception($message, $code); |
|
29 | } |
||
30 | |||
31 | // @codeCoverageIgnoreStart |
||
32 | return false; |
||
33 | // @codeCoverageIgnoreEnd |
||
34 | 16 | }, $callback); |
|
35 | } |
||
73 |