From c5ad127854eb2618a2cc417c301a15963314be12 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 23 Jun 2020 12:55:06 +0100 Subject: [PATCH] BaseInventory: mark eventProcessor as nullable, fixes a phpstan level 8 error --- src/pocketmine/inventory/BaseInventory.php | 2 +- tests/phpstan/configs/l8-baseline.neon | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/pocketmine/inventory/BaseInventory.php b/src/pocketmine/inventory/BaseInventory.php index 434495cfce..dc6dc87e46 100644 --- a/src/pocketmine/inventory/BaseInventory.php +++ b/src/pocketmine/inventory/BaseInventory.php @@ -53,7 +53,7 @@ abstract class BaseInventory implements Inventory{ protected $slots; /** @var Player[] */ protected $viewers = []; - /** @var InventoryEventProcessor */ + /** @var InventoryEventProcessor|null */ protected $eventProcessor; /** diff --git a/tests/phpstan/configs/l8-baseline.neon b/tests/phpstan/configs/l8-baseline.neon index 241359db44..fe72e60653 100644 --- a/tests/phpstan/configs/l8-baseline.neon +++ b/tests/phpstan/configs/l8-baseline.neon @@ -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