phpstan: make EntityEvent generic, fix a bunch of 'actual-problems' ignored errors

This commit is contained in:
Dylan K. Taylor
2020-06-21 00:18:36 +01:00
parent c523595e85
commit 49d3a42120
23 changed files with 53 additions and 31 deletions

View File

@ -27,6 +27,9 @@ use pocketmine\entity\Human;
use pocketmine\event\Cancellable;
use pocketmine\event\entity\EntityEvent;
/**
* @phpstan-extends EntityEvent<Human>
*/
class PlayerExhaustEvent extends EntityEvent implements Cancellable{
public const CAUSE_ATTACK = 1;
public const CAUSE_DAMAGE = 2;