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

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