Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/app.php 2 locations

@@ 474-481 (lines=8) @@
471
472
		$activeAppIndex = -1;
473
		$activeApp = OC::$server->getNavigationManager()->getActiveEntry();
474
		foreach ($list as $index => &$navEntry) {
475
			if ($navEntry['id'] == $activeApp) {
476
				$navEntry['active'] = true;
477
				$activeAppIndex = $index;
478
			} else {
479
				$navEntry['active'] = false;
480
			}
481
		}
482
		unset($navEntry);
483
484
		if (count($list) <= 8) {
@@ 513-520 (lines=8) @@
510
		$list = self::proceedNavigation($entries);
511
512
		$activeApp = OC::$server->getNavigationManager()->getActiveEntry();
513
		foreach ($list as $index => &$navEntry) {
514
			if ($navEntry['id'] == $activeApp) {
515
				$navEntry['active'] = true;
516
				$activeAppIndex = $index;
517
			} else {
518
				$navEntry['active'] = false;
519
			}
520
		}
521
522
523
		if (count($list) <= 8) {