1 | <?php |
||
10 | final class TestErrorHandler implements ErrorHandler |
||
11 | { |
||
12 | /** |
||
13 | * @var \SplObjectStorage |
||
14 | */ |
||
15 | private $errors; |
||
16 | |||
17 | public function __construct() |
||
21 | |||
22 | public function handle(\Throwable $t, array $context = []): void |
||
26 | |||
27 | /** |
||
28 | * Checks whether an error has been handled. |
||
29 | */ |
||
30 | public function contains(\Throwable $t): bool |
||
34 | |||
35 | /** |
||
36 | * Returns the context for an error or null if not found. |
||
37 | */ |
||
38 | public function getContext(\Throwable $t): ?array |
||
46 | |||
47 | /** |
||
48 | * Returns the errors in the form of [error, context]. |
||
49 | */ |
||
50 | public function getErrors(): array |
||
60 | } |
||
61 |