Code Duplication    Length = 42-43 lines in 2 locations

mod/gc_mobile_api/models/user.php 1 location

@@ 207-249 (lines=43) @@
204
	false
205
);
206
207
function build_date($month, $year)
208
{
209
	$string = "01/";
210
	switch ($month) {
211
		case 1:
212
			$string = "01/";
213
			break;
214
		case 2:
215
			$string = "02/";
216
			break;
217
		case 3:
218
			$string = "03/";
219
			break;
220
		case 4:
221
			$string = "04/";
222
			break;
223
		case 5:
224
			$string = "05/";
225
			break;
226
		case 6:
227
			$string = "06/";
228
			break;
229
		case 7:
230
			$string = "07/";
231
			break;
232
		case 8:
233
			$string = "08/";
234
			break;
235
		case 9:
236
			$string = "09/";
237
			break;
238
		case 10:
239
			$string = "10/";
240
			break;
241
		case 11:
242
			$string = "11/";
243
			break;
244
		case 12:
245
			$string = "12/";
246
			break;
247
	}
248
	return $string . $year;
249
}
250
251
function get_user_data($profileemail, $user, $lang)
252
{

mod/gc_api/lib/profile.php 1 location

@@ 934-975 (lines=42) @@
931
	return $user_entity;
932
}
933
934
function buildDate($month, $year)
935
{
936
	switch ($month) {
937
		case 1:
938
			$string = "01/";
939
			break;
940
		case 2:
941
			$string = "02/";
942
			break;
943
		case 3:
944
			$string = "03/";
945
			break;
946
		case 4:
947
			$string = "04/";
948
			break;
949
		case 5:
950
			$string = "05/";
951
			break;
952
		case 6:
953
			$string = "06/";
954
			break;
955
		case 7:
956
			$string = "07/";
957
			break;
958
		case 8:
959
			$string = "08/";
960
			break;
961
		case 9:
962
			$string = "09/";
963
			break;
964
		case 10:
965
			$string = "10/";
966
			break;
967
		case 11:
968
			$string = "11/";
969
			break;
970
		case 12:
971
			$string = "12/";
972
			break;
973
	}
974
	return $string.$year;
975
}
976