diff --git a/src/network/mcpe/protocol/types/SkinData.php b/src/network/mcpe/protocol/types/SkinData.php index 151c94297..5474731e5 100644 --- a/src/network/mcpe/protocol/types/SkinData.php +++ b/src/network/mcpe/protocol/types/SkinData.php @@ -75,7 +75,7 @@ class SkinData{ $this->resourcePatch = $resourcePatch; $this->skinImage = $skinImage; $this->animations = $animations; - $this->capeImage = $capeImage; + $this->capeImage = $capeImage ?? new SkinImage(0, 0, ""); $this->geometryData = $geometryData; $this->animationData = $animationData; $this->premium = $premium; diff --git a/tests/phpstan/configs/l8-baseline.neon b/tests/phpstan/configs/l8-baseline.neon index c6591941f..e66475f1e 100644 --- a/tests/phpstan/configs/l8-baseline.neon +++ b/tests/phpstan/configs/l8-baseline.neon @@ -535,11 +535,6 @@ parameters: count: 1 path: ../../../src/network/mcpe/protocol/SetScoreboardIdentityPacket.php - - - message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\SkinData\\:\\:\\$capeImage \\(pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\SkinImage\\) does not accept pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\SkinImage\\|null\\.$#" - count: 1 - path: ../../../src/network/mcpe/protocol/types/SkinData.php - - message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\entity\\\\EntityLink\\:\\:\\$fromEntityUniqueId \\(int\\) does not accept int\\|null\\.$#" count: 1