diff --git a/system/libs/pot/OTS_MonstersList.php b/system/libs/pot/OTS_MonstersList.php index bdc6bd06..fb51a085 100644 --- a/system/libs/pot/OTS_MonstersList.php +++ b/system/libs/pot/OTS_MonstersList.php @@ -174,6 +174,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * @return OTS_Monster Monster. * @throws DOMException On DOM operation error. */ + #[\ReturnTypeWillChange] public function current() { return $this->getMonster( key($this->monsters) ); @@ -187,7 +188,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Moves to next iterator monster. */ - public function next() + public function next(): void { next($this->monsters); } @@ -197,6 +198,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * * @return string Current position key. */ + #[\ReturnTypeWillChange] public function key() { return key($this->monsters); @@ -207,7 +209,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * * @return bool If iterator has anything more. */ - public function valid() + public function valid(): bool { return key($this->monsters) !== null; } @@ -215,7 +217,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Resets iterator index. */ - public function rewind() + public function rewind(): void { reset($this->monsters); } @@ -226,6 +228,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * @param string $offset Array key. * @return bool True if it's set. */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->monsters[$offset]); @@ -239,6 +242,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * @return OTS_Monster Monster instance. * @throws DOMException On DOM operation error. */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->getMonster($offset); @@ -251,6 +255,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * @param mixed $value Field value. * @throws E_OTS_ReadOnly Always - this class is read-only. */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw new E_OTS_ReadOnly(); @@ -262,6 +267,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess * @param string|int $offset Array key. * @throws E_OTS_ReadOnly Always - this class is read-only. */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { throw new E_OTS_ReadOnly(); diff --git a/system/libs/pot/OTS_SpellsList.php b/system/libs/pot/OTS_SpellsList.php index 8455b7f2..21b80ef4 100644 --- a/system/libs/pot/OTS_SpellsList.php +++ b/system/libs/pot/OTS_SpellsList.php @@ -308,7 +308,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable * @since 0.1.5 * @return AppendIterator Iterator for all spells. */ - public function getIterator() + public function getIterator(): Traversable { $iterator = new AppendIterator(); $iterator->append( new ArrayIterator($this->runes) );