*/ final class PrivateIterator implements Iterator { /** @var Iterator */ private Iterator $iterator; /** * @param Iterator $iterator * * @psalm-param Iterator $iterator */ public function __construct(Iterator $iterator) { $this->iterator = $iterator; } /** * @return Promise */ public function advance(): Promise { return $this->iterator->advance(); } /** * @psalm-return TValue */ public function getCurrent() { return $this->iterator->getCurrent(); } }