mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-14 22:01:59 +00:00
TypeConverter: fixed PHPStan errors
This commit is contained in:
parent
500c298aaf
commit
e62794e4cf
@ -215,9 +215,6 @@ class TypeConverter{
|
|||||||
if(($idTag = $compound->getTag(self::PM_ID_TAG)) instanceof IntTag){
|
if(($idTag = $compound->getTag(self::PM_ID_TAG)) instanceof IntTag){
|
||||||
$id = $idTag->getValue();
|
$id = $idTag->getValue();
|
||||||
$compound->removeTag(self::PM_ID_TAG);
|
$compound->removeTag(self::PM_ID_TAG);
|
||||||
if($compound->count() === 0){
|
|
||||||
$compound = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(($damageTag = $compound->getTag(self::DAMAGE_TAG)) instanceof IntTag){
|
if(($damageTag = $compound->getTag(self::DAMAGE_TAG)) instanceof IntTag){
|
||||||
$meta = $damageTag->getValue();
|
$meta = $damageTag->getValue();
|
||||||
@ -225,8 +222,6 @@ class TypeConverter{
|
|||||||
if(($conflicted = $compound->getTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION)) !== null){
|
if(($conflicted = $compound->getTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION)) !== null){
|
||||||
$compound->removeTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION);
|
$compound->removeTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION);
|
||||||
$compound->setTag(self::DAMAGE_TAG, $conflicted);
|
$compound->setTag(self::DAMAGE_TAG, $conflicted);
|
||||||
}elseif($compound->count() === 0){
|
|
||||||
$compound = null;
|
|
||||||
}
|
}
|
||||||
}elseif(($metaTag = $compound->getTag(self::PM_META_TAG)) instanceof IntTag){
|
}elseif(($metaTag = $compound->getTag(self::PM_META_TAG)) instanceof IntTag){
|
||||||
//TODO HACK: This foul-smelling code ensures that we can correctly deserialize an item when the
|
//TODO HACK: This foul-smelling code ensures that we can correctly deserialize an item when the
|
||||||
@ -234,9 +229,9 @@ class TypeConverter{
|
|||||||
//client-side. Aside from being very annoying, this also breaks various server-side behaviours.
|
//client-side. Aside from being very annoying, this also breaks various server-side behaviours.
|
||||||
$meta = $metaTag->getValue();
|
$meta = $metaTag->getValue();
|
||||||
$compound->removeTag(self::PM_META_TAG);
|
$compound->removeTag(self::PM_META_TAG);
|
||||||
if($compound->count() === 0){
|
}
|
||||||
$compound = null;
|
if($compound->count() === 0){
|
||||||
}
|
$compound = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user