Code Duplication    Length = 12-12 lines in 2 locations

statisticsplot.php 2 locations

@@ 255-266 (lines=12) @@
252
		$num  = $stats->statsMarrQuery(false, true);
253
		$indi = array();
254
		$fam  = array();
255
		foreach ($num as $values) {
256
			if (!in_array($values['indi'], $indi) && !in_array($values['fams'], $fam)) {
257
				foreach (array('JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC') as $key => $month) {
258
					if ($month === $values['month']) {
259
						fill_y_data(0, $key, 1);
260
						$total++;
261
					}
262
				}
263
				$indi[] = $values['indi'];
264
				$fam[]  = $values['fams'];
265
			}
266
		}
267
	} else {
268
		$zstart = 0;
269
		$indi   = array();
@@ 273-284 (lines=12) @@
270
		$fam    = array();
271
		foreach ($z_boundaries as $boundary) {
272
			$num = $stats->statsMarrQuery(false, true, $zstart, $boundary);
273
			foreach ($num as $values) {
274
				if (!in_array($values['indi'], $indi) && !in_array($values['fams'], $fam)) {
275
					foreach (array('JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC') as $key => $month) {
276
						if ($month === $values['month']) {
277
							fill_y_data($boundary, $key, 1);
278
							$total++;
279
						}
280
					}
281
					$indi[] = $values['indi'];
282
					$fam[]  = $values['fams'];
283
				}
284
			}
285
			$zstart = $boundary + 1;
286
		}
287
	}