Code Duplication    Length = 7-7 lines in 2 locations

lib/private/legacy/app.php 1 location

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

lib/private/Installer.php 1 location

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