event: harden APIs that accept arrays

plugin devs can't be relied on to pass the proper types to these APIs, and when the wrong types get passed it makes type errors appear from inside the internals.
This commit is contained in:
Dylan K. Taylor
2020-07-04 21:55:23 +01:00
parent 8ce0022de6
commit a34f3261cb
7 changed files with 32 additions and 0 deletions

View File

@ -35,6 +35,11 @@ parameters:
count: 1
path: ../../../src/pocketmine/utils/Utils.php
-
message: "#^Parameter \\#1 \\$ of closure expects TMemberType, TMemberType given\\.$#"
count: 1
path: ../../../src/pocketmine/utils/Utils.php
-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with int and string will always evaluate to true\\.$#"
count: 1