Code Duplication    Length = 5-16 lines in 2 locations

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

@@ 451-466 (lines=16) @@
448
                    } else {
449
                        $question_label = sprintf(__('Question $s', 'event_espresso'), $answer_row['Answer.QST_ID']);
450
                    }
451
                    if (isset($answer_row['Question.QST_type'])
452
                        && $answer_row['Question.QST_type'] == \EEM_Question::QST_type_state
453
                    ) {
454
                        $reg_csv_array[ $question_label ] = \EEM_State::instance()->get_state_name_by_ID(
455
                            $answer_row['Answer.ANS_value']
456
                        );
457
                    } else {
458
                        // this isn't for html, so don't show html entities
459
                        $reg_csv_array[ $question_label ] = html_entity_decode(
460
                            \EEH_Export::prepare_value_from_db_for_display(
461
                                \EEM_Answer::instance(),
462
                                'ANS_value',
463
                                $answer_row['Answer.ANS_value']
464
                            )
465
                        );
466
                    }
467
                }
468
                /**
469
                 * Filter to change the contents of each row of the registrations report CSV file.

core/db_classes/EE_Export.class.php 1 location

@@ 616-620 (lines=5) @@
613
                    } else {
614
                        $question_label = sprintf(__('Question $s', 'event_espresso'), $answer_row['Answer.QST_ID']);
615
                    }
616
                    if (isset($answer_row['Question.QST_type']) && $answer_row['Question.QST_type'] == EEM_Question::QST_type_state) {
617
                        $reg_csv_array[ $question_label ] = EEM_State::instance()->get_state_name_by_ID(
618
                            $answer_row['Answer.ANS_value']
619
                        );
620
                    } else {
621
                        $reg_csv_array[ $question_label ] = $this->_prepare_value_from_db_for_display(
622
                            EEM_Answer::instance(),
623
                            'ANS_value',