Code Duplication    Length = 5-5 lines in 2 locations

core/libraries/form_sections/inputs/EE_State_Select_Input.php 1 location

@@ 97-101 (lines=5) @@
94
        if (! empty($states)) {
95
            // set the default
96
            $state_options[''][''] = '';
97
            foreach ($states as $state) {
98
                if ($state instanceof EE_State) {
99
                    $state_options[ $state->country()->name() ][ $state->get($this->valueFieldName()) ] = $state->name();
100
                }
101
            }
102
        }
103
        return $state_options;
104
    }

modules/single_page_checkout/reg_steps/attendee_information/EE_SPCO_Reg_Step_Attendee_Information.class.php 1 location

@@ 805-809 (lines=5) @@
802
            ? EEM_State::instance()->get_all_states()
803
            : EEM_State::instance()->get_all_active_states();
804
        if (! empty($states)) {
805
            foreach ($states as $state) {
806
                if ($state instanceof EE_State) {
807
                    $state_options[ $state->country()->name() ][ $state->ID() ] = $state->name();
808
                }
809
            }
810
        }
811
        $state_options = apply_filters(
812
            'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__state_options',