Code Duplication    Length = 18-18 lines in 2 locations

lib/private/Settings/Manager.php 2 locations

@@ 456-473 (lines=18) @@
453
	/**
454
	 * @inheritdoc
455
	 */
456
	public function getAdminSettings($section) {
457
		$settings = $this->getBuiltInAdminSettings($section);
458
		$dbRows = $this->mapper->getAdminSettingsFromDB($section);
459
460
		foreach ($dbRows as $row) {
461
			if (!isset($settings[$row['priority']])) {
462
				$settings[$row['priority']] = [];
463
			}
464
			try {
465
				$settings[$row['priority']][] = $this->query($row['class']);
466
			} catch (QueryException $e) {
467
				// skip
468
			}
469
		}
470
471
		ksort($settings);
472
		return $settings;
473
	}
474
475
	/**
476
	 * @inheritdoc
@@ 524-541 (lines=18) @@
521
	/**
522
	 * @inheritdoc
523
	 */
524
	public function getPersonalSettings($section) {
525
		$settings = $this->getBuiltInPersonalSettings($section);
526
		$dbRows = $this->mapper->getPersonalSettingsFromDB($section);
527
528
		foreach ($dbRows as $row) {
529
			if (!isset($settings[$row['priority']])) {
530
				$settings[$row['priority']] = [];
531
			}
532
			try {
533
				$settings[$row['priority']][] = $this->query($row['class']);
534
			} catch (QueryException $e) {
535
				// skip
536
			}
537
		}
538
539
		ksort($settings);
540
		return $settings;
541
	}
542
}
543