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

@@ 990-996 (lines=7) @@
987
		if ($app !== false) {
988
			// check if the app is compatible with this version of ownCloud
989
			$info = self::getAppInfo($app);
990
			if(!is_array($info)) {
991
				throw new \Exception(
992
					$l->t('App "%s" cannot be installed because appinfo file cannot be read.',
993
						[$info['name']]
994
					)
995
				);
996
			}
997
998
			$version = \OCP\Util::getVersion();
999
			if (!self::isAppCompatible($version, $info)) {