Code Duplication    Length = 8-8 lines in 2 locations

lib/private/User/Sync/AllUsersIterator.php 1 location

@@ 40-47 (lines=8) @@
37
		$this->data = $this->backend->getUsers('', self::LIMIT, 0);
38
	}
39
40
	public function next() {
41
		$this->position++;
42
		if ($this->currentDataPos() === 0) {
43
			$this->page++;
44
			$offset = $this->page * self::LIMIT;
45
			$this->data = $this->backend->getUsers('', self::LIMIT, $offset);
46
		}
47
	}
48
}

lib/private/User/Sync/SeenUsersIterator.php 1 location

@@ 45-52 (lines=8) @@
42
		$this->data = $this->mapper->findUserIds($this->backend, true, self::LIMIT, 0);
43
	}
44
45
	public function next() {
46
		$this->position++;
47
		if ($this->currentDataPos() === 0) {
48
			$this->page++;
49
			$offset = $this->page * self::LIMIT;
50
			$this->data = $this->mapper->findUserIds($this->backend, true, self::LIMIT, $offset);
51
		}
52
	}
53
}