protocol: fixed static analysis warnings in MetadataProperty::equals() implementations

This commit is contained in:
Dylan K. Taylor 2019-12-03 12:06:57 +00:00
parent e110ea5aea
commit fede6b8234
6 changed files with 6 additions and 6 deletions

View File

@ -60,6 +60,6 @@ final class BlockPosMetadataProperty implements MetadataProperty{
}
public function equals(MetadataProperty $other) : bool{
return $other instanceof $this and $other->value->equals($this->value);
return $other instanceof self and $other->value->equals($this->value);
}
}

View File

@ -51,7 +51,7 @@ final class CompoundTagMetadataProperty implements MetadataProperty{
}
public function equals(MetadataProperty $other) : bool{
return $other instanceof $this and $other->value->equals($this->value);
return $other instanceof self and $other->value->equals($this->value);
}
public static function read(NetworkBinaryStream $in) : self{

View File

@ -49,7 +49,7 @@ final class FloatMetadataProperty implements MetadataProperty{
}
public function equals(MetadataProperty $other) : bool{
return $other instanceof $this and $other->value === $this->value;
return $other instanceof self and $other->value === $this->value;
}
public static function read(NetworkBinaryStream $in) : self{

View File

@ -49,7 +49,7 @@ trait IntegerishMetadataProperty{
}
public function equals(MetadataProperty $other) : bool{
return $other instanceof $this and $other->value === $this->value;
return $other instanceof self and $other->value === $this->value;
}
public static function buildFromFlags(array $flags) : self{

View File

@ -49,6 +49,6 @@ final class StringMetadataProperty implements MetadataProperty{
}
public function equals(MetadataProperty $other) : bool{
return $other instanceof $this and $other->value === $this->value;
return $other instanceof self and $other->value === $this->value;
}
}

View File

@ -57,6 +57,6 @@ class Vec3MetadataProperty implements MetadataProperty{
}
public function equals(MetadataProperty $other) : bool{
return $other instanceof $this and $other->value->equals($this->value);
return $other instanceof self and $other->value->equals($this->value);
}
}