From 333ed8ed2fa6d1d132bb817e7a8290c4ca3ba55c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 17 Jun 2020 21:32:51 +0100 Subject: [PATCH] RuntimeBlockMapping: remove unnecessary nullable flag --- src/network/mcpe/convert/RuntimeBlockMapping.php | 2 +- tests/phpstan/configs/l8-baseline.neon | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/network/mcpe/convert/RuntimeBlockMapping.php b/src/network/mcpe/convert/RuntimeBlockMapping.php index 056842172..54002ed50 100644 --- a/src/network/mcpe/convert/RuntimeBlockMapping.php +++ b/src/network/mcpe/convert/RuntimeBlockMapping.php @@ -160,7 +160,7 @@ final class RuntimeBlockMapping{ /** * @phpstan-return CacheableNbt<\pocketmine\nbt\tag\ListTag> */ - public function getStartGamePaletteCache() : ?CacheableNbt{ + public function getStartGamePaletteCache() : CacheableNbt{ return $this->startGamePaletteCache ?? new CacheableNbt(new ListTag($this->bedrockKnownStates)); } } diff --git a/tests/phpstan/configs/l8-baseline.neon b/tests/phpstan/configs/l8-baseline.neon index 724427da1..4b7cfbd5a 100644 --- a/tests/phpstan/configs/l8-baseline.neon +++ b/tests/phpstan/configs/l8-baseline.neon @@ -485,11 +485,6 @@ parameters: count: 1 path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php - - - message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\StartGamePacket\\:\\:\\$blockTable \\(pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\CacheableNbt\\\\) does not accept pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\CacheableNbt\\\\|null\\.$#" - count: 1 - path: ../../../src/network/mcpe/handler/PreSpawnPacketHandler.php - - message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\LevelSoundEventPacket\\:\\:\\$position \\(pocketmine\\\\math\\\\Vector3\\) does not accept pocketmine\\\\math\\\\Vector3\\|null\\.$#" count: 1