mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 08:19:45 +00:00
protocol: fixed static analysis warnings in MetadataProperty::equals() implementations
This commit is contained in:
parent
e110ea5aea
commit
fede6b8234
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user