Code Duplication    Length = 8-9 lines in 2 locations

lib/private/Updater.php 1 location

@@ 366-373 (lines=8) @@
363
	/**
364
	 * @return bool
365
	 */
366
	private function isCodeUpgrade() {
367
		$installedVersion = $this->config->getSystemValue('version', '0.0.0');
368
		$currentVersion = implode('.', Util::getVersion());
369
		if (version_compare($currentVersion, $installedVersion, '>')) {
370
			return true;
371
		}
372
		return false;
373
	}
374
375
	/**
376
	 * @param array $disabledApps

lib/private/Repair/Apps.php 1 location

@@ 76-84 (lines=9) @@
73
	 * Are we updating from an older version?
74
	 * @return bool
75
	 */
76
	private function isCoreUpdate() {
77
		$installedVersion = $this->config->getSystemValue('version', '0.0.0');
78
		$currentVersion = implode('.', \OCP\Util::getVersion());
79
		$versionDiff = version_compare($currentVersion, $installedVersion);
80
		if ($versionDiff > 0) {
81
			return true;
82
		}
83
		return false;
84
	}
85
86
	/**
87
	 * If we are updating from <= 10.0.0 we need to enable the marketplace before running the update