Code Duplication    Length = 10-11 lines in 3 locations

mod/wet4/start.php 3 locations

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