Code Duplication    Length = 6-8 lines in 2 locations

lib/private/Repair/Apps.php 2 locations

@@ 112-117 (lines=6) @@
109
	 * @throws RepairException
110
	 */
111
	public function run(IOutput $output) {
112
		if ($this->config->getSystemValue('has_internet_connection', true) !== true) {
113
			$link = $this->defaults->buildDocLinkToKey('admin-marketplace-apps');
114
			$output->info('No internet connection available - no app updates will be taken from the marketplace.');
115
			$output->info("How to update apps in such situation please see $link");
116
			$this->appManager->disableApp('market');
117
		}
118
		$appsToUpgrade = $this->getAppsToUpgrade();
119
		$failedCompatibleApps = [];
120
		$failedMissingApps = $appsToUpgrade[self::KEY_MISSING];
@@ 319-326 (lines=8) @@
316
			return true;
317
		}
318
		// if the appstore was explicitly disabled -> disable market app as well
319
		if (!$this->isAppStoreEnabled()) {
320
			$this->appManager->disableApp('market');
321
			$link = $this->defaults->buildDocLinkToKey('admin-marketplace-apps');
322
			$output->info('Appstore was disabled in past versions and marketplace interactions are disabled for now as well.');
323
			$output->info('If you would like to get automated app updates on upgrade please enable the market app and remove "appstoreenabled" from your config.');
324
			$output->info("Please note that the market app is not recommended for clustered setups - see $link");
325
			return false;
326
		}
327
328
		// Then we need to enable the market app to support app updates / downloads during upgrade
329
		$output->info('Enabling market app to assist with update');