From 101dc1e1d716f5bb57d7be93df117177de1015c0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 4 Sep 2020 01:44:21 +0100 Subject: [PATCH] fixed a couple of new phpstan errors --- src/entity/Entity.php | 1 + src/entity/EntityDataHelper.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/entity/Entity.php b/src/entity/Entity.php index c3ac15109..c90930eed 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1645,6 +1645,7 @@ abstract class Entity{ /** * @return MetadataProperty[] + * @phpstan-return array */ final protected function getSyncedNetworkData(bool $dirtyOnly) : array{ $this->syncNetworkData($this->networkProperties); diff --git a/src/entity/EntityDataHelper.php b/src/entity/EntityDataHelper.php index cf70e29eb..e4632aa07 100644 --- a/src/entity/EntityDataHelper.php +++ b/src/entity/EntityDataHelper.php @@ -45,6 +45,7 @@ final class EntityDataHelper{ if(!($yawPitch instanceof ListTag) or $yawPitch->getTagType() !== NBT::TAG_Float){ throw new \UnexpectedValueException("'Rotation' should be a List"); } + /** @var FloatTag[] $values */ $values = $yawPitch->getValue(); if(count($values) !== 2){ throw new \UnexpectedValueException("Expected exactly 2 entries for 'Rotation'");