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

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