Code Duplication    Length = 6-6 lines in 2 locations

lib/private/legacy/app.php 2 locations

@@ 489-494 (lines=6) @@
486
		}
487
488
		$headerIconCount = 7;
489
		if($activeAppIndex > ($headerIconCount-1)) {
490
			$active = $list[$activeAppIndex];
491
			$lastInHeader = $list[$headerIconCount-1];
492
			$list[$headerIconCount-1] = $active;
493
			$list[$activeAppIndex] = $lastInHeader;
494
		}
495
496
		foreach ($list as $index => &$navEntry) {
497
			$navEntry['showInHeader'] = false;
@@ 529-534 (lines=6) @@
526
527
		$headerIconCount = 7;
528
		// move active item to last position
529
		if($activeAppIndex > ($headerIconCount-1)) {
530
			$active = $list[$activeAppIndex];
531
			$lastInHeader = $list[$headerIconCount-1];
532
			$list[$headerIconCount-1] = $active;
533
			$list[$activeAppIndex] = $lastInHeader;
534
		}
535
		$list = array_slice($list, 0, $headerIconCount);
536
537
		return $list;