Revert "N°4517 - PHP 8.1: Fix return type hint for iterable classes"

This reverts commit 61be903eb2.
This commit is contained in:
Molkobain
2023-01-16 14:38:20 +01:00
parent 61be903eb2
commit 4c127b6f61
4 changed files with 14 additions and 14 deletions

View File

@@ -38,7 +38,7 @@ interface iDBObjectSetIterator extends Countable
*
* @return int
*/
public function Count(): int;
public function Count();
/**
* Reset the cursor to the first item in the collection. Equivalent to Seek(0)

View File

@@ -843,7 +843,7 @@ class DBObjectSet implements iDBObjectSetIterator
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
*/
public function Count(): int
public function Count()
{
if (is_null($this->m_iNumTotalDBRows))
{

View File

@@ -312,7 +312,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
* @throws \CoreUnexpectedValue
* @throws \MySQLException
*/
public function Count(): int
public function Count()
{
$this->LoadOriginalIds();
$iRet = count($this->aPreserved) + count($this->aAdded) + count($this->aModified);
@@ -327,7 +327,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
* @throws Exception
* @internal param int $iRow
*/
public function Seek($iPosition): void
public function Seek($iPosition)
{
$this->LoadOriginalIds();
@@ -375,7 +375,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
*/
public function current(): mixed
public function current()
{
$this->LoadOriginalIds();
@@ -410,7 +410,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
* @throws \CoreUnexpectedValue
* @throws \MySQLException
*/
public function next(): void
public function next()
{
$this->LoadOriginalIds();
@@ -440,7 +440,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(): mixed
public function key()
{
return $this->iCursor;
}
@@ -455,7 +455,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
* @throws \CoreUnexpectedValue
* @throws \MySQLException
*/
public function valid(): bool
public function valid()
{
$this->LoadOriginalIds();
@@ -473,7 +473,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
* @throws \CoreUnexpectedValue
* @throws \MySQLException
*/
public function rewind(): void
public function rewind()
{
$this->LoadOriginalIds();

View File

@@ -745,27 +745,27 @@ class RelationTypeIterator implements Iterator
}
}
public function rewind(): void
public function rewind()
{
$this->iCurrentIdx = 0;
}
public function valid(): bool
public function valid()
{
return array_key_exists($this->iCurrentIdx, $this->aList);
}
public function next(): void
public function next()
{
$this->iCurrentIdx++;
}
public function current(): mixed
public function current()
{
return $this->aList[$this->iCurrentIdx];
}
public function key(): mixed
public function key()
{
return $this->iCurrentIdx;
}