Code Duplication    Length = 7-8 lines in 2 locations

lib/private/Installer.php 1 location

@@ 123-130 (lines=8) @@
120
		}
121
122
		$version = \OCP\Util::getVersion();
123
		if (!\OC_App::isAppCompatible($version, $info)) {
124
			throw new \Exception(
125
				// TODO $l
126
				$l->t('App "%s" cannot be installed because it is not compatible with this version of the server.',
127
					[$info['name']]
128
				)
129
			);
130
		}
131
132
		// check for required dependencies
133
		\OC_App::checkAppDependencies($this->config, $l, $info);

lib/private/legacy/app.php 1 location

@@ 989-995 (lines=7) @@
986
			}
987
988
			$version = \OCP\Util::getVersion();
989
			if (!self::isAppCompatible($version, $info)) {
990
				throw new \Exception(
991
					$l->t('App "%s" cannot be installed because it is not compatible with this version of the server.',
992
						array($info['name'])
993
					)
994
				);
995
			}
996
997
			// check for required dependencies
998
			self::checkAppDependencies($config, $l, $info);