Code Duplication    Length = 5-5 lines in 4 locations

mod/gc_mobile_api/models/user.php 2 locations

@@ 361-365 (lines=5) @@
358
359
			$user['education']['item_'.$i]['start_date'] = build_date($school->startdate, $school->startyear);
360
361
			if ($school->ongoing == "false") {
362
				$user['education']['item_'.$i]['end_date'] = build_date($school->enddate, $school->endyear);
363
			} else {
364
				$user['education']['item_'.$i]['end_date'] = "present/actuel";
365
			}
366
			$user['education']['item_'.$i]['degree'] = $school->degree;
367
			$user['education']['item_'.$i]['field_of_study'] = $school->field;
368
			$i++;
@@ 391-395 (lines=5) @@
388
			$user['experience']['item_'.$i]['job_title'] = $job->title;
389
			$user['experience']['item_'.$i]['organization'] = $job->organization;
390
			$user['experience']['item_'.$i]['start_date'] = build_date($job->startdate, $job->startyear);
391
			if ($job->ongoing == "false") {
392
				$user['experience']['item_'.$i]['end_date'] = build_date($job->enddate, $job->endyear);
393
			} else {
394
				$user['experience']['item_'.$i]['end_date'] = "present/actuel";
395
			}
396
			$user['experience']['item_'.$i]['responsibilities'] = $job->responsibilities;
397
398
			$j = 0;

mod/gc_api/lib/profile.php 2 locations

@@ 158-162 (lines=5) @@
155
156
			$user['education']['item_'.$i]['start_date'] = buildDate($school->startdate, $school->startyear);
157
158
			if ($school->ongoing == "false") {
159
				$user['education']['item_'.$i]['end_date'] = buildDate($school->enddate, $school->endyear);
160
			} else {
161
				$user['education']['item_'.$i]['end_date'] = "present/actuel";
162
			}
163
			$user['education']['item_'.$i]['degree'] = $school->degree;
164
			$user['education']['item_'.$i]['field_of_study'] = $school->field;
165
			$i++;
@@ 184-188 (lines=5) @@
181
			$user['experience']['item_'.$i]['job_title'] = $job->title;
182
			$user['experience']['item_'.$i]['organization'] = $job->organization;
183
			$user['experience']['item_'.$i]['start_date'] = buildDate($job->startdate, $job->startyear);
184
			if ($job->ongoing == "false") {
185
				$user['experience']['item_'.$i]['end_date'] = buildDate($job->enddate, $job->endyear);
186
			} else {
187
				$user['experience']['item_'.$i]['end_date'] = "present/actuel";
188
			}
189
			$user['experience']['item_'.$i]['responsibilities'] = $job->responsibilities;
190
191
			$j = 0;