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

@@ 325-329 (lines=5) @@
322
                    $reg_csv_array[\EEH_Export::get_column_name_for_field($field_obj)] = $value;
323
                }
324
                //make sure each registration has the same questions in the same order
325
                foreach ($questions_for_these_regs_rows as $question_row) {
326
                    if ( ! isset($reg_csv_array[$question_row['Question.QST_admin_label']])) {
327
                        $reg_csv_array[$question_row['Question.QST_admin_label']] = null;
328
                    }
329
                }
330
                $answers = \EEM_Answer::instance()->get_all_wpdb_results(array(
331
                        array('REG_ID' => $reg_row['Registration.REG_ID']),
332
                        'force_join' => array('Question'),