Code Duplication    Length = 7-7 lines in 2 locations

core/db_models/EEM_Registration.model.php 2 locations

@@ 344-350 (lines=7) @@
341
		$select_parts = array();
342
343
		//loop through registration stati to do parts for each status.
344
		foreach ( EEM_Registration::reg_status_array() as $STS_ID => $STS_code ) {
345
			if ( $STS_ID === EEM_Registration::status_id_incomplete ) {
346
				continue;
347
			}
348
			$select_parts[] = "COUNT($STS_code.REG_ID) as $STS_ID";
349
			$join_parts[] = "$registration_table AS $STS_code ON $STS_code.REG_date = dates.REG_date AND $STS_code.STS_ID = '$STS_ID'";
350
		}
351
352
		//setup the selects
353
		$select .= implode(', ', $select_parts );
@@ 439-445 (lines=7) @@
436
		$select_parts = array();
437
438
		//loop through registration stati to do parts for each status.
439
		foreach ( EEM_Registration::reg_status_array() as $STS_ID => $STS_code ) {
440
			if ( $STS_ID === EEM_Registration::status_id_incomplete ) {
441
				continue;
442
			}
443
			$select_parts[] = "COUNT($STS_code.REG_ID) as $STS_ID";
444
			$join_parts[] = "$registration_table AS $STS_code ON $STS_code.EVT_ID = dates.EVT_ID AND $STS_code.STS_ID = '$STS_ID' AND $STS_code.REG_date = dates.REG_date";
445
		}
446
447
		//setup the selects
448
		$select .= implode( ', ', $select_parts );