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

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