BaseInventory: mark eventProcessor as nullable, fixes a phpstan level 8 error

This commit is contained in:
Dylan K. Taylor 2020-06-23 12:55:06 +01:00
parent 0f6dc9082a
commit c5ad127854
2 changed files with 1 additions and 6 deletions

View File

@ -53,7 +53,7 @@ abstract class BaseInventory implements Inventory{
protected $slots;
/** @var Player[] */
protected $viewers = [];
/** @var InventoryEventProcessor */
/** @var InventoryEventProcessor|null */
protected $eventProcessor;
/**

View File

@ -985,11 +985,6 @@ parameters:
count: 2
path: ../../../src/pocketmine/event/entity/EntityDamageByEntityEvent.php
-
message: "#^Property pocketmine\\\\inventory\\\\BaseInventory\\:\\:\\$eventProcessor \\(pocketmine\\\\inventory\\\\InventoryEventProcessor\\) does not accept pocketmine\\\\inventory\\\\InventoryEventProcessor\\|null\\.$#"
count: 1
path: ../../../src/pocketmine/inventory/BaseInventory.php
-
message: "#^Method pocketmine\\\\inventory\\\\CraftingManager\\:\\:getCraftingDataPacket\\(\\) should return pocketmine\\\\network\\\\mcpe\\\\protocol\\\\BatchPacket but returns pocketmine\\\\network\\\\mcpe\\\\protocol\\\\BatchPacket\\|null\\.$#"
count: 1