Code Duplication    Length = 10-11 lines in 3 locations

mod/wet4/start.php 3 locations

@@ 1340-1350 (lines=11) @@
1337
			$return[] = \ElggMenuItem::factory($options);
1338
		}
1339
		// comment blog
1340
		if($object->getSubtype() == 'blog'){
1341
			if ($object->canComment()) {
1342
				$options = array(
1343
					"name" => "comments",
1344
					"text" => '<i class="fa fa-lg fa-comment icon-unsel"><span class="wb-inv">' . elgg_echo("entity:comment:link:blog", array($entName)) . '</span></i>',
1345
					"title" => elgg_echo("comment:this"),
1346
					"href" => $object->getURL() . "#comments"
1347
				);
1348
				$return[] = \ElggMenuItem::factory($options);
1349
			}
1350
		}
1351
		// reply discussion
1352
		if($object->getSubtype() == 'groupforumtopic'){
1353
			if ($object->status != "closed") {
@@ 1352-1362 (lines=11) @@
1349
			}
1350
		}
1351
		// reply discussion
1352
		if($object->getSubtype() == 'groupforumtopic'){
1353
			if ($object->status != "closed") {
1354
				$options = array(
1355
					"name" => "reply",
1356
					"text" => '<i class="fa fa-lg fa-reply icon-unsel"><span class="wb-inv">' . elgg_echo("entity:reply:groupdorumtopic",array($entName)) . '</span></i>',
1357
					"title" => elgg_echo("reply:this"),
1358
					"href" => $object->getURL() . "#reply"
1359
				);
1360
				$return[] = \ElggMenuItem::factory($options);
1361
			}
1362
		}
1363
		// add event calendar
1364
		if($object->getSubtype() == 'event_calendar'){
1365
			if (check_entity_relationship($user_guid, 'personal_event', $object->guid)) {
@@ 1395-1404 (lines=10) @@
1392
		}
1393
		//question - answer
1394
		if($object->getSubtype() == 'question' || $object->getSubtype() == 'answer'){	
1395
			if ($object->canComment()) {	
1396
				$options = array(
1397
					'name' => 'comments',
1398
					"text" => '<span class="fa fa-lg fa-comment icon-unsel"><span class="wb-inv">' . elgg_echo("entity:comment:link:question", array($entName)) . '</span></span>',
1399
					"title" => elgg_echo("comment:this"),
1400
					'href' => $object->getURL() ."#commentsadd{$object->getGUID()}",
1401
					'priority' => 288,
1402
				);
1403
				$return[] = \ElggMenuItem::factory($options);
1404
			}
1405
		}
1406
	}
1407