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

@@ 749-758 (lines=10) @@
746
747
	// likes count
748
	$count = elgg_view('likes/count', array('entity' => $entity));
749
	if ($count) {
750
		$options = array(
751
			'name' => 'likes_count',
752
			'text' => $count,
753
			'href' => false,
754
			'priority' => 999,
755
			'item_class' => 'entity-menu-bubble',
756
		);
757
		$return[] = ElggMenuItem::factory($options);
758
	}
759
760
	return $return;
761
}
@@ 1298-1305 (lines=8) @@
1295
1296
			// likes count
1297
			$count = elgg_view('likes/count', array('entity' => $object));
1298
			if ($count) {
1299
				$return[] = ElggMenuItem::factory(array(
1300
					'name' => 'likes_count',
1301
					'text' => $count,
1302
					'href' => false,
1303
					'priority' => 101,
1304
				));
1305
			}
1306
		}
1307
1308
		$blocked_subtypes = array('comment', 'discussion_reply');