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

@@ 710-719 (lines=10) @@
707
708
	// likes count
709
	$count = elgg_view('likes/count', array('entity' => $entity));
710
	if ($count) {
711
		$options = array(
712
			'name' => 'likes_count',
713
			'text' => $count,
714
			'href' => false,
715
			'priority' => 999,
716
			'item_class' => 'entity-menu-bubble',
717
		);
718
		$return[] = ElggMenuItem::factory($options);
719
	}
720
721
	return $return;
722
}
@@ 1201-1208 (lines=8) @@
1198
1199
			// likes count
1200
			$count = elgg_view('likes/count', array('entity' => $object));
1201
			if ($count) {
1202
				$return[] = ElggMenuItem::factory(array(
1203
					'name' => 'likes_count',
1204
					'text' => $count,
1205
					'href' => false,
1206
					'priority' => 101,
1207
				));
1208
			}
1209
		}
1210
1211
		$blocked_subtypes = array('comment', 'discussion_reply');