more php 8.2 tweaks

This commit is contained in:
GameHerobrine 2023-07-03 07:42:02 +03:00
parent 6d89c50e43
commit 332252bacb
4 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ class Matrix implements ArrayAccess{
} }
} }
} }
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function offsetExists($offset){ public function offsetExists($offset){
return isset($this->matrix[(int) $offset]); return isset($this->matrix[(int) $offset]);

View file

@ -145,7 +145,7 @@ class NBT_new{
$tag->read($this); $tag->read($this);
break; break;
case NBT::TAG_Enum: case NBT::TAG_Enum:
$tag = new Enum($this->getString()); $tag = new EnumTag($this->getString());
$tag->read($this); $tag->read($this);
break; break;
case NBT::TAG_Compound: case NBT::TAG_Compound:

View file

@ -19,7 +19,7 @@
* *
*/ */
class Enum extends NamedTag implements \ArrayAccess, \Countable{ class EnumTag extends NamedTag implements \ArrayAccess, \Countable{
private $tagType; private $tagType;

View file

@ -26,7 +26,7 @@ abstract class NamedTag extends Tag{
/** /**
* @param string $name * @param string $name
* @param bool|float|double|int|byte|short|array|Compound|Enum|string $value * @param bool|float|double|int|byte|short|array|Compound|EnumTag|string $value
*/ */
public function __construct($name = "", $value = false){ public function __construct($name = "", $value = false){
$this->name = $name; $this->name = $name;