Code Duplication    Length = 7-8 lines in 2 locations

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);

lib/private/Installer.php 1 location

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