Code Duplication    Length = 8-10 lines in 4 locations

mod/likes/start.php 2 locations

@@ 89-97 (lines=9) @@
86
	
87
	// likes count
88
	$count = elgg_view('likes/count', array('entity' => $entity));
89
	if ($count) {
90
		$options = array(
91
			'name' => 'likes_count',
92
			'text' => $count,
93
			'href' => false,
94
			'priority' => 1001,
95
		);
96
		$return[] = ElggMenuItem::factory($options);
97
	}
98
99
	return $return;
100
}
@@ 154-161 (lines=8) @@
151
152
	// likes count
153
	$count = elgg_view('likes/count', array('entity' => $object));
154
	if ($count) {
155
		$return[] = ElggMenuItem::factory(array(
156
			'name' => 'likes_count',
157
			'text' => $count,
158
			'href' => false,
159
			'priority' => 101,
160
		));
161
	}
162
163
	return $return;
164
}

mod/wet4/start.php 2 locations

@@ 748-757 (lines=10) @@
745
746
	// likes count
747
	$count = elgg_view('likes/count', array('entity' => $entity));
748
	if ($count) {
749
		$options = array(
750
			'name' => 'likes_count',
751
			'text' => $count,
752
			'href' => false,
753
			'priority' => 999,
754
			'item_class' => 'entity-menu-bubble',
755
		);
756
		$return[] = ElggMenuItem::factory($options);
757
	}
758
759
	return $return;
760
}
@@ 1241-1248 (lines=8) @@
1238
1239
			// likes count
1240
			$count = elgg_view('likes/count', array('entity' => $object));
1241
			if ($count) {
1242
				$return[] = ElggMenuItem::factory(array(
1243
					'name' => 'likes_count',
1244
					'text' => $count,
1245
					'href' => false,
1246
					'priority' => 101,
1247
				));
1248
			}
1249
		}
1250
1251
		$blocked_subtypes = array('comment', 'discussion_reply');