Code Duplication    Length = 12-12 lines in 2 locations

statisticsplot.php 2 locations

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