Code Duplication    Length = 7-7 lines in 2 locations

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)) {

lib/private/Installer.php 1 location

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