Code Duplication    Length = 5-6 lines in 2 locations

apps/files_external/lib/config.php 1 location

@@ 259-263 (lines=5) @@
256
	public static function readData($user = null) {
257
		if (isset($user)) {
258
			$jsonFile = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json';
259
		} else {
260
			$config = \OC::$server->getConfig();
261
			$datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
262
			$jsonFile = $config->getSystemValue('mount_file', $datadir . '/mount.json');
263
		}
264
		if (is_file($jsonFile)) {
265
			$mountPoints = json_decode(file_get_contents($jsonFile), true);
266
			if (is_array($mountPoints)) {

lib/private/installer.php 1 location

@@ 357-362 (lines=6) @@
354
		// whether the application needs to be signed.
355
		$appId = OC_App::cleanAppId($data['appdata']['id']);
356
		$appBelongingToId = OC_App::getInternalAppIdByOcs($appId);
357
		if(is_string($appBelongingToId)) {
358
			$previouslySigned = \OC::$server->getConfig()->getAppValue($appBelongingToId, 'signed', 'false');
359
		} else {
360
			$appBelongingToId = $info['id'];
361
			$previouslySigned = 'false';
362
		}
363
		if($data['appdata']['level'] === OC_App::officialApp || $previouslySigned === 'true') {
364
			\OC::$server->getConfig()->setAppValue($appBelongingToId, 'signed', 'true');
365
			$integrityResult = \OC::$server->getIntegrityCodeChecker()->verifyAppSignature(