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

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