diff --git a/src/event/AsyncEventDelegate.php b/src/event/AsyncEventDelegate.php index 6c20ad0b9..7cccb3660 100644 --- a/src/event/AsyncEventDelegate.php +++ b/src/event/AsyncEventDelegate.php @@ -33,7 +33,7 @@ use function count; final class AsyncEventDelegate{ /** @phpstan-var ObjectSet> $promises */ private ObjectSet $promises; - /** @var array, int> $delegatesCall */ + /** @var array, int> $delegatesCallDepth */ private static array $delegatesCallDepth = []; private const MAX_EVENT_CALL_DEPTH = 50; diff --git a/tests/phpstan/configs/actual-problems.neon b/tests/phpstan/configs/actual-problems.neon index 47b2615b9..f48f611ee 100644 --- a/tests/phpstan/configs/actual-problems.neon +++ b/tests/phpstan/configs/actual-problems.neon @@ -1205,4 +1205,8 @@ parameters: count: 1 path: ../../../src/plugin/PluginManager.php + - + message: "#^Parameter \\#1 \\$handler of class pocketmine\\\\event\\\\RegisteredAsyncListener constructor expects Closure\\(pocketmine\\\\event\\\\AsyncEvent&pocketmine\\\\event\\\\Event\\)\\: pocketmine\\\\promise\\\\Promise\\, Closure\\(TEvent\\)\\: pocketmine\\\\promise\\\\Promise\\ given\\.$#" + count: 1 + path: ../../../src/plugin/PluginManager.php