mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°4517 - PHP 8.1: Fix return types to match Iterator interface
This commit is contained in:
@@ -374,7 +374,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
* @throws \MySQLException
|
||||
* @throws \MySQLHasGoneAwayException
|
||||
*/
|
||||
public function current()
|
||||
public function current(): mixed
|
||||
{
|
||||
$this->LoadOriginalIds();
|
||||
|
||||
@@ -409,7 +409,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
public function next()
|
||||
public function next(): void
|
||||
{
|
||||
$this->LoadOriginalIds();
|
||||
|
||||
@@ -439,7 +439,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
* @link http://php.net/manual/en/iterator.key.php
|
||||
* @return mixed scalar on success, or null on failure.
|
||||
*/
|
||||
public function key()
|
||||
public function key(): mixed
|
||||
{
|
||||
return $this->iCursor;
|
||||
}
|
||||
@@ -454,7 +454,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
$this->LoadOriginalIds();
|
||||
|
||||
@@ -472,7 +472,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
public function rewind()
|
||||
public function rewind(): void
|
||||
{
|
||||
$this->LoadOriginalIds();
|
||||
|
||||
|
||||
@@ -745,27 +745,27 @@ class RelationTypeIterator implements Iterator
|
||||
}
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
public function rewind(): void
|
||||
{
|
||||
$this->iCurrentIdx = 0;
|
||||
}
|
||||
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return array_key_exists($this->iCurrentIdx, $this->aList);
|
||||
}
|
||||
|
||||
public function next()
|
||||
public function next(): void
|
||||
{
|
||||
$this->iCurrentIdx++;
|
||||
}
|
||||
|
||||
public function current()
|
||||
public function current(): mixed
|
||||
{
|
||||
return $this->aList[$this->iCurrentIdx];
|
||||
}
|
||||
|
||||
public function key()
|
||||
public function key(): mixed
|
||||
{
|
||||
return $this->iCurrentIdx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user