Code Duplication    Length = 7-7 lines in 2 locations

lib/private/Installer.php 1 location

@@ 114-120 (lines=7) @@
111
112
		$l = \OC::$server->getL10N('core');
113
114
		if(!is_array($info)) {
115
			throw new \Exception(
116
				$l->t('App "%s" cannot be installed because appinfo file cannot be read.',
117
					[$info['name']]
118
				)
119
			);
120
		}
121
122
		$version = \OCP\Util::getVersion();
123
		if (!\OC_App::isAppCompatible($version, $info)) {

lib/private/legacy/app.php 1 location

@@ 980-986 (lines=7) @@
977
		if ($app !== false) {
978
			// check if the app is compatible with this version of ownCloud
979
			$info = self::getAppInfo($app);
980
			if(!is_array($info)) {
981
				throw new \Exception(
982
					$l->t('App "%s" cannot be installed because appinfo file cannot be read.',
983
						[$info['name']]
984
					)
985
				);
986
			}
987
988
			$version = \OCP\Util::getVersion();
989
			if (!self::isAppCompatible($version, $info)) {