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

@@ 999-1005 (lines=7) @@
996
			}
997
998
			$version = \OCP\Util::getVersion();
999
			if (!self::isAppCompatible($version, $info)) {
1000
				throw new \Exception(
1001
					$l->t('App "%s" cannot be installed because it is not compatible with this version of the server.',
1002
						array($info['name'])
1003
					)
1004
				);
1005
			}
1006
1007
			// check for required dependencies
1008
			self::checkAppDependencies($config, $l, $info);