Code Duplication    Length = 13-13 lines in 4 locations

mod/gc_mobile_api/models/members.php 2 locations

@@ 81-93 (lines=13) @@
78
	}
79
80
	$data = array();
81
	foreach ($members as $member) {
82
		$member_obj = get_user($member->guid);
83
		$member_data = get_user_block($member->guid, $lang);
84
85
		$about = "";
86
		if ($member_obj->description) {
87
			$about = strip_tags($member_obj->description, '<p>');
88
			$about = str_replace("<p>&nbsp;</p>", '', $about);
89
		}
90
91
		$member_data['about'] = $about;
92
		$data[] = $member_data;
93
	}
94
95
	return $data;
96
}
@@ 149-161 (lines=13) @@
146
	$members = json_decode($members);
147
148
	$data = array();
149
	foreach ($members as $member) {
150
		$member_obj = get_user($member->guid);
151
		$member_data = get_user_block($member->guid, $lang);
152
153
		$about = "";
154
		if ($member_obj->description) {
155
			$about = strip_tags($member_obj->description, '<p>');
156
			$about = str_replace("<p>&nbsp;</p>", '', $about);
157
		}
158
159
		$member_data['about'] = $about;
160
		$data[] = $member_data;
161
	}
162
163
	return $data;
164
}

mod/gc_mobile_api/models/user.php 1 location

@@ 944-956 (lines=13) @@
941
	));
942
943
	$data = array();
944
	foreach ($friendrequests as $member) {
945
		$member_obj = get_user($member->guid);
946
		$member_data = get_user_block($member->guid, $lang);
947
948
		$about = "";
949
		if ($member_obj->description) {
950
			$about = strip_tags($member_obj->description, '<p>');
951
			$about = str_replace("<p>&nbsp;</p>", '', $about);
952
		}
953
954
		$member_data['about'] = $about;
955
		$data[] = $member_data;
956
	}
957
958
	return $data;
959
}

mod/gc_mobile_api/models/group.php 1 location

@@ 761-773 (lines=13) @@
758
	$members = json_decode($members);
759
760
	$data = array();
761
	foreach ($members as $member) {
762
		$member_obj = get_user($member->guid);
763
		$member_data = get_user_block($member->guid, $lang);
764
765
		$about = "";
766
		if ($member_obj->description) {
767
			$about = strip_tags($member_obj->description, '<p>');
768
			$about = str_replace("<p>&nbsp;</p>", '', $about);
769
		}
770
771
		$member_data['about'] = $about;
772
		$data[] = $member_data;
773
	}
774
775
	return $data;
776
}