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

@@ 369-374 (lines=6) @@
366
		// whether the application needs to be signed.
367
		$appId = OC_App::cleanAppId($data['appdata']['id']);
368
		$appBelongingToId = OC_App::getInternalAppIdByOcs($appId);
369
		if(is_string($appBelongingToId)) {
370
			$previouslySigned = \OC::$server->getConfig()->getAppValue($appBelongingToId, 'signed', 'false');
371
		} else {
372
			$appBelongingToId = $info['id'];
373
			$previouslySigned = 'false';
374
		}
375
		if (file_exists($extractDir . '/appinfo/signature.json') || $previouslySigned === 'true') {
376
			\OC::$server->getConfig()->setAppValue($appBelongingToId, 'signed', 'true');
377
			$integrityResult = \OC::$server->getIntegrityCodeChecker()->verifyAppSignature(