fix PHPStan

This commit is contained in:
ShockedPlot7560 2023-10-27 22:08:49 +02:00
parent cc6e8ef232
commit ca95b2f28d
No known key found for this signature in database
GPG Key ID: D7539B420F1FA86E
2 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,7 @@ use function count;
final class AsyncEventDelegate{ final class AsyncEventDelegate{
/** @phpstan-var ObjectSet<Promise<null>> $promises */ /** @phpstan-var ObjectSet<Promise<null>> $promises */
private ObjectSet $promises; private ObjectSet $promises;
/** @var array<class-string<AsyncEvent&Event>, int> $delegatesCall */ /** @var array<class-string<AsyncEvent&Event>, int> $delegatesCallDepth */
private static array $delegatesCallDepth = []; private static array $delegatesCallDepth = [];
private const MAX_EVENT_CALL_DEPTH = 50; private const MAX_EVENT_CALL_DEPTH = 50;

View File

@ -1205,4 +1205,8 @@ parameters:
count: 1 count: 1
path: ../../../src/plugin/PluginManager.php 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\\<null\\>, Closure\\(TEvent\\)\\: pocketmine\\\\promise\\\\Promise\\<null\\> given\\.$#"
count: 1
path: ../../../src/plugin/PluginManager.php