The doc comment array<class-string, callable> at position 2 could not be parsed: Unknown type name 'class-string' at position 2 in array<class-string, callable>.
Loading history...
14
private array $handlers = [];
15
16
/**
17
* @param class-string $exception
18
*/
19
1
public function handle(string $exception, callable $handler): self
20
{
21
1
$this->handlers[$exception] = $handler;
22
1
return $this;
23
}
24
25
2
public function getByException(Exception $exception): ?callable