Remove nullable return types on CompoundTag getters

this doesn't make sense because there are default value parameters for this
This commit is contained in:
Dylan K. Taylor
2017-10-16 18:22:45 +01:00
parent c8379efbce
commit 292e462ea0
2 changed files with 15 additions and 11 deletions

View File

@ -429,7 +429,7 @@ class Item implements ItemIds, \JsonSerializable{
public function getCustomName() : string{
$display = $this->getNamedTagEntry(self::TAG_DISPLAY);
if($display instanceof CompoundTag){
return $display->getString(self::TAG_DISPLAY_NAME) ?? "";
return $display->getString(self::TAG_DISPLAY_NAME, "");
}
return "";
@ -957,7 +957,7 @@ class Item implements ItemIds, \JsonSerializable{
}
$count = Binary::unsignByte($tag->getByte("Count"));
$meta = $tag->getShort("Damage") ?? 0;
$meta = $tag->getShort("Damage", 0);
$idTag = $tag->getTag("id");
if($idTag instanceof ShortTag){