mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
fixed a couple of new phpstan errors
This commit is contained in:
parent
0aee39027e
commit
101dc1e1d7
@ -1645,6 +1645,7 @@ abstract class Entity{
|
||||
|
||||
/**
|
||||
* @return MetadataProperty[]
|
||||
* @phpstan-return array<int, MetadataProperty>
|
||||
*/
|
||||
final protected function getSyncedNetworkData(bool $dirtyOnly) : array{
|
||||
$this->syncNetworkData($this->networkProperties);
|
||||
|
@ -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<Float>");
|
||||
}
|
||||
/** @var FloatTag[] $values */
|
||||
$values = $yawPitch->getValue();
|
||||
if(count($values) !== 2){
|
||||
throw new \UnexpectedValueException("Expected exactly 2 entries for 'Rotation'");
|
||||
|
Loading…
x
Reference in New Issue
Block a user