Add missing setValue() override to LongTag

why did this take two commits ;-;
This commit is contained in:
Dylan K. Taylor 2017-10-14 22:24:17 +01:00
parent 51906daad0
commit 2e73fd7f8c

View File

@ -57,4 +57,16 @@ class LongTag extends NamedTag{
public function &getValue() : int{
return parent::getValue();
}
/**
* @param int $value
*
* @throws \TypeError
*/
public function setValue($value) : void{
if(!is_int($value)){
throw new \TypeError("LongTag value must be of type int, " . gettype($value) . " given");
}
parent::setValue($value);
}
}