Use static-analysis-friendly method for getting effects from EffectManager

fixes 5 phpstan level 8 errors
This commit is contained in:
Dylan K. Taylor
2020-06-27 13:08:36 +01:00
parent 9e6f1c9a5a
commit 7e331c590d
3 changed files with 8 additions and 18 deletions

View File

@ -130,16 +130,6 @@ parameters:
count: 1
path: ../../../src/entity/Entity.php
-
message: "#^Cannot call method getEffectLevel\\(\\) on pocketmine\\\\entity\\\\effect\\\\EffectInstance\\|null\\.$#"
count: 3
path: ../../../src/entity/Living.php
-
message: "#^Cannot call method getEffectLevel\\(\\) on pocketmine\\\\entity\\\\effect\\\\EffectInstance\\|null\\.$#"
count: 2
path: ../../../src/event/entity/EntityDamageByEntityEvent.php
-
message: "#^Parameter \\#2 \\$oldContents of method pocketmine\\\\inventory\\\\InventoryListener\\:\\:onContentChange\\(\\) expects array\\<pocketmine\\\\item\\\\Item\\>, array\\<int, pocketmine\\\\item\\\\Item\\|null\\> given\\.$#"
count: 1