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

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