Skip to content

Commit

Permalink
Fix implemented interface
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Dec 19, 2024
1 parent 521656d commit 153ea2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Doctrine\ODM\MongoDB\Iterator;

use Countable;
use Iterator;
use Iterator as SPLIterator;
use IteratorIterator;
use ReturnTypeWillChange;
use RuntimeException;
Expand Down Expand Up @@ -34,8 +34,8 @@ final class CachingIterator implements Countable, Iterator
/** @var array<mixed, TValue> */
private array $items = [];

/** @var Iterator<mixed, TValue>|null */
private ?Iterator $iterator;
/** @var SPLIterator<mixed, TValue>|null */
private ?SPLIterator $iterator;

private bool $iteratorAdvanced = false;

Expand Down Expand Up @@ -136,8 +136,8 @@ private function exhaustIterator(): void
}
}

/** @return Iterator<mixed, TValue> */
private function getIterator(): Iterator
/** @return SPLIterator<mixed, TValue> */
private function getIterator(): SPLIterator
{
if ($this->iterator === null) {
throw new RuntimeException('Iterator has already been destroyed');
Expand Down
10 changes: 5 additions & 5 deletions lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Doctrine\ODM\MongoDB\Iterator;

use Iterator;
use Iterator as SPLIterator;
use IteratorIterator;
use LogicException;
use ReturnTypeWillChange;
Expand All @@ -24,8 +24,8 @@
*/
final class UnrewindableIterator implements Iterator
{
/** @var Iterator<mixed, TValue>|null */
private ?Iterator $iterator;
/** @var SPLIterator<mixed, TValue>|null */
private ?SPLIterator $iterator;

private bool $iteratorAdvanced = false;

Expand Down Expand Up @@ -111,8 +111,8 @@ private function preventRewinding(string $method): void
}
}

/** @return Iterator<mixed, TValue> */
private function getIterator(): Iterator
/** @return SPLIterator<mixed, TValue> */
private function getIterator(): SPLIterator
{
if ($this->iterator === null) {
throw new RuntimeException('Iterator has already been destroyed');
Expand Down

0 comments on commit 153ea2a

Please sign in to comment.