Code Duplication    Length = 14-15 lines in 2 locations

lib/Service/SyncService.php 2 locations

@@ 223-237 (lines=15) @@
220
	/**
221
	 * @return void
222
	 */
223
	public function syncNextcloudUsers(): void {
224
		$this->outputService->output('Syncing Nextcloud Users');
225
226
		$users = $this->userManager->search('');
227
		$this->outputService->startMigrationProgress(count($users));
228
229
		foreach ($users as $user) {
230
			try {
231
				$this->syncNextcloudUser($user->getUID());
232
			} catch (Exception $e) {
233
			}
234
		}
235
236
		$this->outputService->finishMigrationProgress();
237
	}
238
239
	/**
240
	 * @param string $userId
@@ 262-275 (lines=14) @@
259
	/**
260
	 * @return void
261
	 */
262
	public function syncNextcloudGroups(): void {
263
		$this->outputService->output('Syncing Nextcloud Groups');
264
265
		$groups = $this->groupManager->search('');
266
		$this->outputService->startMigrationProgress(count($groups));
267
		foreach ($groups as $group) {
268
			try {
269
				$this->syncNextcloudGroup($group->getGID());
270
			} catch (Exception $e) {
271
			}
272
		}
273
274
		$this->outputService->finishMigrationProgress();
275
	}
276
277
	/**
278
	 * @param string $groupId