Code Duplication    Length = 5-5 lines in 2 locations

apps/files/lib/Controller/ViewController.php 1 location

@@ 186-190 (lines=5) @@
183
		$nav->assign('webdavurl', $webdavurl);
184
185
		$nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used']));
186
		if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
187
			$totalSpace = $this->l10n->t('Unlimited');
188
		} else {
189
			$totalSpace = \OC_Helper::humanFileSize($storageInfo['total']);
190
		}
191
		$nav->assign('total_space', $totalSpace);
192
		$nav->assign('quota', $storageInfo['quota']);
193
		$nav->assign('usage_relative', $storageInfo['relative']);

lib/private/Settings/Personal/PersonalInfo.php 1 location

@@ 103-107 (lines=5) @@
100
		$userData = $this->accountManager->getUser($user);
101
102
		$storageInfo = \OC_Helper::getStorageInfo('/');
103
		if ($storageInfo['quota'] === FileInfo::SPACE_UNLIMITED) {
104
			$totalSpace = $this->l->t('Unlimited');
105
		} else {
106
			$totalSpace = \OC_Helper::humanFileSize($storageInfo['total']);
107
		}
108
109
		$languageParameters = $this->getLanguages($user);
110
		$localeParameters = $this->getLocales($user);