Total Complexity | 2 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
22 | class SentryErrorListener |
||
23 | { |
||
24 | /** @var SentryLoggerInterface */ |
||
25 | protected $sentryLogger; |
||
26 | |||
27 | /** |
||
28 | * SentryErrorListener constructor. |
||
29 | * |
||
30 | * @param SentryLoggerInterface $sentryLogger |
||
31 | */ |
||
32 | public function __construct(SentryLoggerInterface $sentryLogger) |
||
33 | { |
||
34 | $this->sentryLogger = $sentryLogger; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Invoke the listener. |
||
39 | * |
||
40 | * |
||
41 | * @param Throwable|Exception $error The error. |
||
42 | * @param ServerRequestInterface $request The request. |
||
43 | * @param ResponseInterface $response The response. |
||
44 | * |
||
45 | * @return void |
||
46 | */ |
||
47 | public function __invoke($error, ServerRequestInterface $request, ResponseInterface $response) |
||
56 | } |
||
57 | |||
59 |