Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 228-232 (lines=5) @@
225
	public function readData($user = null) {
226
		if (isset($user)) {
227
			$jsonFile = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json';
228
		} else {
229
			$config = \OC::$server->getConfig();
230
			$datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
231
			$jsonFile = $config->getSystemValue('mount_file', $datadir . '/mount.json');
232
		}
233
		if (is_file($jsonFile)) {
234
			$mountPoints = json_decode(file_get_contents($jsonFile), true);
235
			if (is_array($mountPoints)) {

lib/private/Installer.php 1 location

@@ 347-352 (lines=6) @@
344
		// whether the application needs to be signed.
345
		$appId = OC_App::cleanAppId(isset($data['appdata']['id']) ? $data['appdata']['id'] : '');
346
		$appBelongingToId = OC_App::getInternalAppIdByOcs($appId);
347
		if(is_string($appBelongingToId)) {
348
			$previouslySigned = \OC::$server->getConfig()->getAppValue($appBelongingToId, 'signed', 'false');
349
		} else {
350
			$appBelongingToId = $info['id'];
351
			$previouslySigned = 'false';
352
		}
353
		if (file_exists($extractDir . '/appinfo/signature.json') || $previouslySigned === 'true') {
354
			\OC::$server->getConfig()->setAppValue($appBelongingToId, 'signed', 'true');
355
			$integrityResult = \OC::$server->getIntegrityCodeChecker()->verifyAppSignature(