Code Duplication    Length = 10-11 lines in 3 locations

mod/wet4/start.php 3 locations

@@ 1368-1378 (lines=11) @@
1365
			$return[] = \ElggMenuItem::factory($options);
1366
		}
1367
		// comment blog
1368
		if($object->getSubtype() == 'blog'){
1369
			if ($object->canComment()) {
1370
				$options = array(
1371
					"name" => "comments",
1372
					"text" => '<i class="fa fa-lg fa-comment icon-unsel"><span class="wb-inv">' . elgg_echo("entity:comment:link:blog", array($entName)) . '</span></i>',
1373
					"title" => elgg_echo("comment:this"),
1374
					"href" => $object->getURL() . "#comments"
1375
				);
1376
				$return[] = \ElggMenuItem::factory($options);
1377
			}
1378
		}
1379
		// reply discussion
1380
		if($object->getSubtype() == 'groupforumtopic'){
1381
			if ($object->status != "closed") {
@@ 1380-1390 (lines=11) @@
1377
			}
1378
		}
1379
		// reply discussion
1380
		if($object->getSubtype() == 'groupforumtopic'){
1381
			if ($object->status != "closed") {
1382
				$options = array(
1383
					"name" => "reply",
1384
					"text" => '<i class="fa fa-lg fa-reply icon-unsel"><span class="wb-inv">' . elgg_echo("entity:reply:groupdorumtopic",array($entName)) . '</span></i>',
1385
					"title" => elgg_echo("reply:this"),
1386
					"href" => $object->getURL() . "#reply"
1387
				);
1388
				$return[] = \ElggMenuItem::factory($options);
1389
			}
1390
		}
1391
		// add event calendar
1392
		if($object->getSubtype() == 'event_calendar'){
1393
			if (check_entity_relationship($user_guid, 'personal_event', $object->guid)) {
@@ 1423-1432 (lines=10) @@
1420
		}
1421
		//question - answer
1422
		if($object->getSubtype() == 'question' || $object->getSubtype() == 'answer'){	
1423
			if ($object->canComment()) {	
1424
				$options = array(
1425
					'name' => 'comments',
1426
					"text" => '<span class="fa fa-lg fa-comment icon-unsel"><span class="wb-inv">' . elgg_echo("entity:comment:link:question", array($entName)) . '</span></span>',
1427
					"title" => elgg_echo("comment:this"),
1428
					'href' => $object->getURL() ."#commentsadd{$object->getGUID()}",
1429
					'priority' => 288,
1430
				);
1431
				$return[] = \ElggMenuItem::factory($options);
1432
			}
1433
		}
1434
	}
1435