Code Duplication    Length = 5-5 lines in 2 locations

core/db_classes/EE_Export.class.php 1 location

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

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

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