Code Duplication    Length = 3-5 lines in 2 locations

lib/private/User/Database.php 1 location

@@ 387-389 (lines=3) @@
384
	 * @return string|false
385
	 */
386
	public function getHome(string $uid) {
387
		if ($this->userExists($uid)) {
388
			return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $uid;
389
		}
390
391
		return false;
392
	}

apps/files_external/lib/Lib/Storage/SFTP.php 1 location

@@ 215-219 (lines=5) @@
212
	private function hostKeysPath() {
213
		try {
214
			$storage_view = \OCP\Files::getStorage('files_external');
215
			if ($storage_view) {
216
				return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') .
217
					$storage_view->getAbsolutePath('') .
218
					'ssh_hostKeys';
219
			}
220
		} catch (\Exception $e) {
221
		}
222
		return false;