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

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