Code Duplication    Length = 5-13 lines in 2 locations

core/db_classes/EE_Export.class.php 1 location

@@ 475-479 (lines=5) @@
472
					}else{
473
						$question_label = sprintf( __( 'Question $s', 'event_espresso' ), $answer_row[ 'Answer.QST_ID' ] );
474
					}
475
                                        if( isset( $answer_row[ 'Question.QST_type'] ) && $answer_row[ 'Question.QST_type' ] == EEM_Question::QST_type_state ) {
476
                                            $reg_csv_array[ $question_label ] = EEM_State::instance()->get_state_name_by_ID( $answer_row[ 'Answer.ANS_value' ] );
477
                                        } else {
478
                                            $reg_csv_array[ $question_label ] = $this->_prepare_value_from_db_for_display( EEM_Answer::instance(), 'ANS_value', $answer_row[ 'Answer.ANS_value' ] );
479
                                        }
480
				}
481
				$registrations_csv_ready_array[] = apply_filters( 'FHEE__EE_Export__report_registrations__reg_csv_array', $reg_csv_array, $reg_row );
482
			}

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

@@ 305-317 (lines=13) @@
302
					} else {
303
						$question_label = sprintf( __( 'Question $s', 'event_espresso' ), $answer_row[ 'Answer.QST_ID' ] );
304
					}
305
					if ( isset( $answer_row[ 'Question.QST_type' ] )
306
						 && $answer_row[ 'Question.QST_type' ] == \EEM_Question::QST_type_state
307
					) {
308
						$reg_csv_array[ $question_label ] = \EEM_State::instance()->get_state_name_by_ID(
309
							$answer_row[ 'Answer.ANS_value' ]
310
						);
311
					} else {
312
						$reg_csv_array[ $question_label ] = \EEH_Export::prepare_value_from_db_for_display(
313
							\EEM_Answer::instance(),
314
							'ANS_value',
315
							$answer_row[ 'Answer.ANS_value' ]
316
						);
317
					}
318
				}
319
				$registrations_csv_ready_array[] = apply_filters(
320
					'FHEE__EE_Export__report_registrations__reg_csv_array',