Code Duplication    Length = 10-10 lines in 2 locations

lib/private/Settings/Manager.php 2 locations

@@ 345-354 (lines=10) @@
342
		];
343
344
		$result = $query->execute();
345
		while($row = $result->fetch()) {
346
			if(!isset($sections[$row['priority']])) {
347
				$sections[$row['priority']] = [];
348
			}
349
			try {
350
				$sections[$row['priority']][] = $this->query($row['class']);
351
			} catch (QueryException $e) {
352
				// skip
353
			}
354
		}
355
		$result->closeCursor();
356
357
		ksort($sections);
@@ 408-417 (lines=10) @@
405
			->setParameter('section', $section);
406
407
		$result = $query->execute();
408
		while($row = $result->fetch()) {
409
			if(!isset($settings[$row['priority']])) {
410
				$settings[$row['priority']] = [];
411
			}
412
			try {
413
				$settings[$row['priority']][] = $this->query($row['class']);
414
			} catch (QueryException $e) {
415
				// skip
416
			}
417
		}
418
		$result->closeCursor();
419
420
		ksort($settings);