Code Duplication    Length = 5-6 lines in 2 locations

lib/private/Files/External/LegacyUtil.php 1 location

@@ 242-246 (lines=5) @@
239
	public function readData($user = null) {
240
		if (isset($user)) {
241
			$jsonFile = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json';
242
		} else {
243
			$config = \OC::$server->getConfig();
244
			$datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
245
			$jsonFile = $config->getSystemValue('mount_file', $datadir . '/mount.json');
246
		}
247
		if (is_file($jsonFile)) {
248
			$mountPoints = json_decode(file_get_contents($jsonFile), true);
249
			if (is_array($mountPoints)) {

lib/private/Installer.php 1 location

@@ 339-344 (lines=6) @@
336
		// whether the application needs to be signed.
337
		$appId = OC_App::cleanAppId($data['appdata']['id']);
338
		$appBelongingToId = OC_App::getInternalAppIdByOcs($appId);
339
		if(is_string($appBelongingToId)) {
340
			$previouslySigned = \OC::$server->getConfig()->getAppValue($appBelongingToId, 'signed', 'false');
341
		} else {
342
			$appBelongingToId = $info['id'];
343
			$previouslySigned = 'false';
344
		}
345
		if (file_exists($extractDir . '/appinfo/signature.json') || $previouslySigned === 'true') {
346
			\OC::$server->getConfig()->setAppValue($appBelongingToId, 'signed', 'true');
347
			$integrityResult = \OC::$server->getIntegrityCodeChecker()->verifyAppSignature(