1313 * error handler more than once is not supported and will lead to nasty
1414 * problems. The code is based on the Symfony ErrorHandler component.
1515 *
16- * @psalm -import-type StacktraceFrame from FrameBuilder
16+ * @phpstan -import-type StacktraceFrame from FrameBuilder
1717 */
1818final class ErrorHandler
1919{
@@ -44,21 +44,21 @@ final class ErrorHandler
4444 /**
4545 * @var callable[] List of listeners that will act on each captured error
4646 *
47- * @psalm -var (callable(\ErrorException): void)[]
47+ * @phpstan -var (callable(\ErrorException): void)[]
4848 */
4949 private $ errorListeners = [];
5050
5151 /**
5252 * @var callable[] List of listeners that will act of each captured fatal error
5353 *
54- * @psalm -var (callable(FatalErrorException): void)[]
54+ * @phpstan -var (callable(FatalErrorException): void)[]
5555 */
5656 private $ fatalErrorListeners = [];
5757
5858 /**
5959 * @var callable[] List of listeners that will act on each captured exception
6060 *
61- * @psalm -var (callable(\Throwable): void)[]
61+ * @phpstan -var (callable(\Throwable): void)[]
6262 */
6363 private $ exceptionListeners = [];
6464
@@ -76,7 +76,7 @@ final class ErrorHandler
7676 /**
7777 * @var callable|null The previous exception handler, if any
7878 *
79- * @psalm -var null|callable(\Throwable): void
79+ * @phpstan -var null|callable(\Throwable): void
8080 */
8181 private $ previousExceptionHandler ;
8282
@@ -250,7 +250,7 @@ public static function registerOnceExceptionHandler(): self
250250 * and that must accept a single argument
251251 * of type \ErrorException
252252 *
253- * @psalm -param callable(\ErrorException): void $listener
253+ * @phpstan -param callable(\ErrorException): void $listener
254254 */
255255 public function addErrorHandlerListener (callable $ listener ): void
256256 {
@@ -265,7 +265,7 @@ public function addErrorHandlerListener(callable $listener): void
265265 * and that must accept a single argument
266266 * of type \Sentry\Exception\FatalErrorException
267267 *
268- * @psalm -param callable(FatalErrorException): void $listener
268+ * @phpstan -param callable(FatalErrorException): void $listener
269269 */
270270 public function addFatalErrorHandlerListener (callable $ listener ): void
271271 {
@@ -280,7 +280,7 @@ public function addFatalErrorHandlerListener(callable $listener): void
280280 * and that must accept a single argument
281281 * of type \Throwable
282282 *
283- * @psalm -param callable(\Throwable): void $listener
283+ * @phpstan -param callable(\Throwable): void $listener
284284 */
285285 public function addExceptionHandlerListener (callable $ listener ): void
286286 {
@@ -460,7 +460,7 @@ private function handleException(\Throwable $exception): void
460460 * @param string $file The filename the backtrace was raised in
461461 * @param int $line The line number the backtrace was raised at
462462 *
463- * @psalm -param list<StacktraceFrame> $backtrace
463+ * @phpstan -param list<StacktraceFrame> $backtrace
464464 *
465465 * @return array<int, mixed>
466466 */
0 commit comments