Code Duplication    Length = 10-12 lines in 3 locations

mod/wet4/start.php 3 locations

@@ 1064-1075 (lines=12) @@
1061
        }
1062
    }
1063
1064
    if($entity->getSubType() == 'file'){
1065
        // download link
1066
		$options = array(
1067
			'name' => 'download',
1068
			'text' => '<i class="fa fa-download fa-lg icon-unsel"><span class="wb-inv">'.$hiddenText['download'].'</span></i>',
1069
			'title' => 'Download File',
1070
			'href' => "file/download/{$entity->getGUID()}",
1071
			'priority' => 300,
1072
		);
1073
		$return[] = \ElggMenuItem::factory($options);
1074
	}
1075
1076
1077
	if ($entity->getSubType() == 'page_top') {
1078
		//history icon
@@ 1077-1087 (lines=11) @@
1074
	}
1075
1076
1077
	if ($entity->getSubType() == 'page_top') {
1078
		//history icon
1079
		$options = array(
1080
			'name' => 'history',
1081
			'text' => '<i class="fa fa-history fa-lg icon-unsel"><span class="wb-inv">' . $hiddenText['history'] . '</span></i>',
1082
			'title'=> elgg_echo('pages:history'),
1083
			'href' => "pages/history/$entity->guid",
1084
			'priority' => 150,
1085
		);
1086
		$return[] = \ElggMenuItem::factory($options);
1087
	}
1088
1089
	//opening and close dicussions
1090
	if (elgg_instanceof($entity, "object", "groupforumtopic") && $entity->canEdit() && elgg_is_active_plugin('group_tools')) {
@@ 1383-1392 (lines=10) @@
1380
			$return[] = \ElggMenuItem::factory($options);
1381
		}
1382
		// download file
1383
		if($object->getSubType() == 'file'){
1384
			$options = array(
1385
				'name' => 'download',
1386
				'text' => '<i class="fa fa-download fa-lg icon-unsel"><span class="wb-inv">'.$hiddenText['download'].'</span></i>',
1387
				'title' => elgg_echo('download'),
1388
				'href' => "file/download/{$object->getGUID()}",
1389
				'priority' => 300,
1390
			);
1391
			$return[] = \ElggMenuItem::factory($options);
1392
		}
1393
		//question - answer
1394
		if($object->getSubtype() == 'question' || $object->getSubtype() == 'answer'){	
1395
			if ($object->canComment()) {