Code Duplication    Length = 11-11 lines in 2 locations

lib/private/App/AppManager.php 1 location

@@ 430-440 (lines=11) @@
427
	 * In case you change this method, also change \OC\App\CodeChecker\InfoChecker::loadShippedJson()
428
	 * @throws \Exception
429
	 */
430
	private function loadShippedJson() {
431
		if ($this->shippedApps === null) {
432
			$shippedJson = \OC::$SERVERROOT . '/core/shipped.json';
433
			if (!file_exists($shippedJson)) {
434
				throw new \Exception("File not found: $shippedJson");
435
			}
436
			$content = json_decode(file_get_contents($shippedJson), true);
437
			$this->shippedApps = $content['shippedApps'];
438
			$this->alwaysEnabled = $content['alwaysEnabled'];
439
		}
440
	}
441
442
	/**
443
	 * @inheritdoc

lib/private/App/CodeChecker/InfoChecker.php 1 location

@@ 99-109 (lines=11) @@
96
	 *
97
	 * @throws \Exception
98
	 */
99
	protected function loadShippedJson() {
100
		if ($this->shippedApps === null) {
101
			$shippedJson = \OC::$SERVERROOT . '/core/shipped.json';
102
			if (!file_exists($shippedJson)) {
103
				throw new \Exception("File not found: $shippedJson");
104
			}
105
			$content = json_decode(file_get_contents($shippedJson), true);
106
			$this->shippedApps = $content['shippedApps'];
107
			$this->alwaysEnabled = $content['alwaysEnabled'];
108
		}
109
	}
110
}
111