Code Duplication    Length = 5-13 lines in 2 locations

core/db_classes/EE_Export.class.php 1 location

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

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

@@ 331-343 (lines=13) @@
328
					} else {
329
						$question_label = sprintf( __( 'Question $s', 'event_espresso' ), $answer_row[ 'Answer.QST_ID' ] );
330
					}
331
					if ( isset( $answer_row[ 'Question.QST_type' ] )
332
						 && $answer_row[ 'Question.QST_type' ] == \EEM_Question::QST_type_state
333
					) {
334
						$reg_csv_array[ $question_label ] = \EEM_State::instance()->get_state_name_by_ID(
335
							$answer_row[ 'Answer.ANS_value' ]
336
						);
337
					} else {
338
						$reg_csv_array[ $question_label ] = \EEH_Export::prepare_value_from_db_for_display(
339
							\EEM_Answer::instance(),
340
							'ANS_value',
341
							$answer_row[ 'Answer.ANS_value' ]
342
						);
343
					}
344
				}
345
				$registrations_csv_ready_array[] = apply_filters(
346
					'FHEE__EE_Export__report_registrations__reg_csv_array',