Code Duplication    Length = 5-5 lines in 2 locations

core/db_classes/EE_Export.class.php 1 location

@@ 462-466 (lines=5) @@
459
				}
460
461
				//make sure each registration has the same questions in the same order
462
				foreach($questions_for_these_regs_rows as $question_row){
463
					if( ! isset($reg_csv_array[$question_row[ 'Question.QST_admin_label']])){
464
						$reg_csv_array[$question_row[ 'Question.QST_admin_label' ] ] = null;
465
					}
466
				}
467
				//now fill out the questions THEY answered
468
				foreach( EEM_Answer::instance()->get_all_wpdb_results( array( array( 'REG_ID' => $reg_row[ 'Registration.REG_ID' ] ), 'force_join' => array( 'Question' ) ) ) as $answer_row){
469
					/* @var $answer EE_Answer */

core/libraries/batch/JobHandlers/RegistrationsReport.php 1 location

@@ 308-312 (lines=5) @@
305
				}
306
307
				//make sure each registration has the same questions in the same order
308
				foreach($questions_for_these_regs_rows as $question_row){
309
					if( ! isset($reg_csv_array[$question_row[ 'Question.QST_admin_label']])){
310
						$reg_csv_array[$question_row[ 'Question.QST_admin_label' ] ] = null;
311
					}
312
				}
313
				$answers = \EEM_Answer::instance()->get_all_wpdb_results(
314
					array(
315
						array( 'REG_ID' => $reg_row[ 'Registration.REG_ID' ] ),