Code Duplication    Length = 10-12 lines in 3 locations

mod/wet4/start.php 3 locations

@@ 1092-1103 (lines=12) @@
1089
        }
1090
    }
1091
1092
    if($entity->getSubType() == 'file'){
1093
        // download link
1094
		$options = array(
1095
			'name' => 'download',
1096
			'text' => '<i class="fa fa-download fa-lg icon-unsel"><span class="wb-inv">'.$hiddenText['download'].'</span></i>',
1097
			'title' => 'Download File',
1098
			'href' => "file/download/{$entity->getGUID()}",
1099
			'priority' => 300,
1100
		);
1101
		$return[] = \ElggMenuItem::factory($options);
1102
	}
1103
1104
1105
	if ($entity->getSubType() == 'page_top') {
1106
		//history icon
@@ 1105-1115 (lines=11) @@
1102
	}
1103
1104
1105
	if ($entity->getSubType() == 'page_top') {
1106
		//history icon
1107
		$options = array(
1108
			'name' => 'history',
1109
			'text' => '<i class="fa fa-history fa-lg icon-unsel"><span class="wb-inv">' . $hiddenText['history'] . '</span></i>',
1110
			'title'=> elgg_echo('pages:history'),
1111
			'href' => "pages/history/$entity->guid",
1112
			'priority' => 150,
1113
		);
1114
		$return[] = \ElggMenuItem::factory($options);
1115
	}
1116
1117
	//opening and close dicussions
1118
	if (elgg_instanceof($entity, "object", "groupforumtopic") && $entity->canEdit() && elgg_is_active_plugin('group_tools')) {
@@ 1411-1420 (lines=10) @@
1408
			$return[] = \ElggMenuItem::factory($options);
1409
		}
1410
		// download file
1411
		if($object->getSubType() == 'file'){
1412
			$options = array(
1413
				'name' => 'download',
1414
				'text' => '<i class="fa fa-download fa-lg icon-unsel"><span class="wb-inv">'.$hiddenText['download'].'</span></i>',
1415
				'title' => elgg_echo('download'),
1416
				'href' => "file/download/{$object->getGUID()}",
1417
				'priority' => 300,
1418
			);
1419
			$return[] = \ElggMenuItem::factory($options);
1420
		}
1421
		//question - answer
1422
		if($object->getSubtype() == 'question' || $object->getSubtype() == 'answer'){	
1423
			if ($object->canComment()) {